Class: User
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- User
- Defined in:
- app/models/user.rb
Instance Method Summary collapse
- #activate! ⇒ Object
- #deliver_activation_confirmation! ⇒ Object
- #deliver_activation_instructions! ⇒ Object
- #deliver_password_reset_instructions! ⇒ Object
- #name ⇒ Object
- #to_s ⇒ Object
Instance Method Details
#activate! ⇒ Object
17 18 19 |
# File 'app/models/user.rb', line 17 def activate! self.update_attributes(:activated_at => Time.now) end |
#deliver_activation_confirmation! ⇒ Object
31 32 33 34 |
# File 'app/models/user.rb', line 31 def deliver_activation_confirmation! reset_perishable_token! Notifier.deliver_activation_confirmation(self) end |
#deliver_activation_instructions! ⇒ Object
26 27 28 29 |
# File 'app/models/user.rb', line 26 def deliver_activation_instructions! reset_perishable_token! Notifier.deliver_activation_instructions(self) end |
#deliver_password_reset_instructions! ⇒ Object
21 22 23 24 |
# File 'app/models/user.rb', line 21 def deliver_password_reset_instructions! reset_perishable_token! Notifier.deliver_password_reset_instructions(self) end |
#name ⇒ Object
13 14 15 |
# File 'app/models/user.rb', line 13 def name [first_name, last_name].reject(&:blank?).join(' ') end |
#to_s ⇒ Object
9 10 11 |
# File 'app/models/user.rb', line 9 def to_s first_name end |