Module: BlueLightSpecial::User::Callbacks

Defined in:
lib/blue_light_special/user.rb

Class Method Summary collapse

Class Method Details

.included(model) ⇒ Object

Hook for callbacks.

salt, token, password encryption are handled before_save.



70
71
72
73
74
75
76
77
# File 'lib/blue_light_special/user.rb', line 70

def self.included(model)
  model.class_eval do
    before_save   :initialize_salt,
                  :encrypt_password
    before_create :generate_remember_token
    after_create  :send_welcome_email
  end
end