Method: Devise::Orm::DataMapper#apply_schema

Defined in:
lib/devise/orm/data_mapper.rb

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

Tell how to apply schema methods. This automatically maps :limit to :length and :null to :nullable.



69
70
71
72
73
74
75
76
77
78
# File 'lib/devise/orm/data_mapper.rb', line 69

def apply_schema(name, type, options={})
  return unless Devise.apply_schema

  SCHEMA_OPTIONS.each do |old_key, new_key|
    next unless options.key?(old_key)
    options[new_key] = options.delete(old_key)
  end

  property name, type, options
end