Class: Class

Inherits:
Object show all
Defined in:
lib/ascension/to_json.rb

Instance Method Summary collapse

Instance Method Details

#setup_mongo_persist(*attrs) ⇒ Object



67
68
69
70
71
72
73
# File 'lib/ascension/to_json.rb', line 67

def setup_mongo_persist(*attrs)
  include MongoPersist
  include JsonPersist
  define_method(:mongo_attributes) do
    attrs.flatten.map { |x| x.to_s }
  end
end