Module: Clearance::User::Callbacks
- Defined in:
- lib/clearance/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.
65 66 67 68 69 70 71 72 73 |
# File 'lib/clearance/user.rb', line 65 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_confirmation_email, :unless => :email_confirmed? end end |