Module: Clearance::User::Callbacks

Defined in:
lib/clearance/user.rb

Class Method Summary collapse

Class Method Details

.included(model) ⇒ Object

Hook for callbacks.

salt, token, password encryption are handled before_save.



84
85
86
87
88
89
90
# File 'lib/clearance/user.rb', line 84

def self.included(model)
  model.class_eval do
    before_save :initialize_salt,
                :encrypt_password,
                :initialize_confirmation_token
  end
end