Module: Cloudfuji::Orm::Mongoid::Schema

Includes:
Schema
Defined in:
lib/cloudfuji/orm/mongoid.rb

Instance Method Summary collapse

Methods included from Schema

#apply_devise_schema, #recoverable, #rememberable, #trackable

Instance Method Details

#apply_cloudfuji_schema(name, type, options = {}) ⇒ Object

Tell how to apply schema methods



19
20
21
22
# File 'lib/cloudfuji/orm/mongoid.rb', line 19

def apply_cloudfuji_schema(name, type, options={})
  type = Time if type == DateTime
  field name, { :type => type }.merge!(options)
end