Sha256: 3fd29fd103d37b602f2945a00e1d4e6c39d84fba597d7fae78c87ca5ec7ea390

Contents?: true

Size: 1.08 KB

Versions: 22

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

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

22 entries across 22 versions & 3 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/devise-4.9.4/lib/devise/modules.rb
devise-4.9.4 lib/devise/modules.rb
devise-4.9.3 lib/devise/modules.rb
devise-4.9.2 lib/devise/modules.rb
devise-4.9.1 lib/devise/modules.rb
devise-4.9.0 lib/devise/modules.rb
devise-4.8.1 lib/devise/modules.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/devise-4.8.0/lib/devise/modules.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/devise-4.8.0/lib/devise/modules.rb
devise-4.8.0 lib/devise/modules.rb
devise-4.7.3 lib/devise/modules.rb
devise-4.7.2 lib/devise/modules.rb
devise-4.7.1 lib/devise/modules.rb
devise-4.7.0 lib/devise/modules.rb
devise-4.6.2 lib/devise/modules.rb
devise-4.6.1 lib/devise/modules.rb
devise-4.6.0 lib/devise/modules.rb
devise-4.5.0 lib/devise/modules.rb
devise-4.4.3 lib/devise/modules.rb
devise-4.4.2 lib/devise/modules.rb