Module: Devise::Orm::SimplyStored::Schema

Includes:
Schema
Defined in:
lib/devise/orm/simply_stored.rb

Instance Method Summary collapse

Instance Method Details

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

Tell how to apply schema methods



35
36
37
38
39
# File 'lib/devise/orm/simply_stored.rb', line 35

def apply_devise_schema(name, type, options={})
  type = Time if type == DateTime
  type = Fixnum if type == Integer
  property name, { :type => type }.merge!(options)
end

#devise_modules_hook!Object



41
42
43
44
45
46
47
48
49
50
# File 'lib/devise/orm/simply_stored.rb', line 41

def devise_modules_hook!
  yield
  # Apply schema to model
  devise_modules.each do |m|
    send(m) if respond_to?(m)
  end
  Devise.authentication_keys.each do |key|
    property key
  end
end