Sha256: 4cf1ffd1b5d88a5b727618c1cfa3058fffeab7405097045d119dc40cf008bc32

Contents?: true

Size: 1.05 KB

Versions: 39

Compression:

Stored size: 1.05 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 :rememberable, no_input: true
  end

  # Other authentications
  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

39 entries across 39 versions & 8 rubygems

Version Path
devise-4.3.0 lib/devise/modules.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/devise-4.2.1/lib/devise/modules.rb
devise-4.2.1 lib/devise/modules.rb
devise-4.2.0 lib/devise/modules.rb
devise-3.5.10 lib/devise/modules.rb
devise-4.0.3 lib/devise/modules.rb
devise-4.1.1 lib/devise/modules.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/devise-4.1.0/lib/devise/modules.rb
devise-4.1.0 lib/devise/modules.rb
devise-3.5.9 lib/devise/modules.rb
devise-4.0.2 lib/devise/modules.rb
devise-4.0.1 lib/devise/modules.rb
devise-3.5.8 lib/devise/modules.rb
devise-3.5.7 lib/devise/modules.rb
devise-4.0.0 lib/devise/modules.rb
devise-4.0.0.rc2 lib/devise/modules.rb
devise-4.0.0.rc1 lib/devise/modules.rb
devise-3.5.6 lib/devise/modules.rb
devise-3.5.5 lib/devise/modules.rb
devise-3.5.4 lib/devise/modules.rb