Module: Alchemy

Defined in:
lib/alchemy/devise.rb,
app/models/alchemy/user.rb,
lib/alchemy/devise/engine.rb,
lib/alchemy/devise/ability.rb,
lib/alchemy/devise/version.rb,
app/mailers/alchemy/notifications.rb,
app/controllers/alchemy/admin/users_controller.rb,
app/controllers/alchemy/base_controller_extension.rb,
app/controllers/alchemy/admin/passwords_controller.rb,
app/controllers/alchemy/admin/user_sessions_controller.rb,
lib/generators/alchemy/devise/install/install_generator.rb

Defined Under Namespace

Modules: Admin, BaseControllerExtension, Devise Classes: Notifications, User

Class Method Summary collapse

Class Method Details

.devise_modulesObject

Devise modules included in Alchemy::User model

Default modules

[

. :database_authenticatable,

:trackable,
:validatable,
:timeoutable,
:recoverable

. ]

If you want to add additional modules into the Alchemy user class append them to this collection in an initializer in your app.

Example

# config/initializers/alchemy.rb
Alchemy.devise_modules << :registerable

If your app uses an old encryption that needs the devise-encryptable gem you also need to load the devise module.

Alchemy.devise_modules << :encryptable


29
30
31
32
33
34
35
36
37
# File 'lib/alchemy/devise.rb', line 29

def self.devise_modules
  @devise_modules ||= [
    :database_authenticatable,
    :trackable,
    :validatable,
    :timeoutable,
    :recoverable
  ]
end