Sha256: 913e80c865a9c05af96039dd09d7f216753681aeffacfec82f04f53926089a6d

Contents?: true

Size: 1.16 KB

Versions: 16

Compression:

Stored size: 1.16 KB

Contents

require 'active_support/core_ext/object/with_options'

Devise.with_options :model => true do |d|
  # Strategies first
  d.with_options :strategy => true do |s|
    routes = [nil, :new, :destroy]
    s.add_module :database_authenticatable, :controller => :sessions, :route => { :session => routes }
    s.add_module :token_authenticatable
    s.add_module :rememberable
  end

  # Other authentications
  d.add_module :encryptable
  d.add_module :omniauthable, :controller => :omniauth_callbacks,  :route => :omniauth_callback

  # Misc after
  routes = [nil, :new, :edit]
  d.add_module :recoverable,  :controller => :passwords,     :route => { :password => routes }
  d.add_module :registerable, :controller => :registrations, :route => { :registration => (routes << :cancel) }
  d.add_module :validatable

  # The ones which can sign out after
  routes = [nil, :new]
  d.add_module :confirmable,  :controller => :confirmations, :route => { :confirmation => routes }
  d.add_module :lockable,     :controller => :unlocks,       :route => { :unlock => routes }
  d.add_module :timeoutable

  # Stats for last, so we make sure the user is really signed in
  d.add_module :trackable
end

Version data entries

16 entries across 16 versions & 3 rubygems

Version Path
devise_sociable-0.1.0 vendor/bundle/gems/devise-1.5.4/lib/devise/modules.rb
devise-1.5.4 lib/devise/modules.rb
devise-2.0.0.rc lib/devise/modules.rb
devise-1.5.3 lib/devise/modules.rb
cloudfoundry-devise-1.5.2 lib/devise/modules.rb
devise-1.5.2 lib/devise/modules.rb
devise-1.5.1 lib/devise/modules.rb
devise-1.5.0 lib/devise/modules.rb
devise-1.5.0.rc1 lib/devise/modules.rb
devise-1.4.9 lib/devise/modules.rb
devise-1.4.8 lib/devise/modules.rb
devise-1.4.7 lib/devise/modules.rb
devise-1.4.5 lib/devise/modules.rb
devise-1.4.3 lib/devise/modules.rb
devise-1.4.2 lib/devise/modules.rb
devise-1.4.1 lib/devise/modules.rb