Method: Devise.add_mapping

Defined in:
lib/devise.rb

.add_mapping(resource, options) ⇒ Object

Small method that adds a mapping to Devise.



198
199
200
201
202
203
# File 'lib/devise.rb', line 198

def self.add_mapping(resource, options)
  mapping = Devise::Mapping.new(resource, options)
  self.mappings[mapping.name] = mapping
  self.default_scope ||= mapping.name
  mapping
end