Module: Authlogic::ActsAsAuthentic::Password::Callbacks

Defined in:
lib/authlogic/acts_as_authentic/password.rb

Overview

Callbacks / hooks to allow other modules to modify the behavior of this module.

Constant Summary collapse

METHODS =

Does the order of this array matter?

%w[
  password_set
  password_verification
].freeze

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object


165
166
167
168
169
170
171
# File 'lib/authlogic/acts_as_authentic/password.rb', line 165

def self.included(klass)
  return if klass.crypted_password_field.nil?
  klass.send :extend, ActiveModel::Callbacks
  METHODS.each do |method|
    klass.define_model_callbacks method, only: %i[before after]
  end
end