Module: Headstart::User::Callbacks
- Defined in:
- lib/headstart/user.rb
Class Method Summary collapse
-
.included(model) ⇒ Object
Hook for callbacks.
Class Method Details
.included(model) ⇒ Object
Hook for callbacks.
salt, token, password encryption are handled before_save.
71 72 73 74 75 76 77 78 79 |
# File 'lib/headstart/user.rb', line 71 def self.included(model) model.class_eval do before_save :initialize_salt, :encrypt_password before_create :generate_confirmation_token, :generate_remember_token after_create :send_welcome_email, :unless => :suppress_receive_welcome_email? end end |