Class: User
Instance Method Summary collapse
- #deliver_password_reset_instructions! ⇒ Object
-
#has_role?(role_in_question) ⇒ Boolean
has_role? simply needs to return true or false whether a user has a role or not.
- #last_address ⇒ Object
Instance Method Details
#deliver_password_reset_instructions! ⇒ Object
23 24 25 26 |
# File 'app/models/user.rb', line 23 def deliver_password_reset_instructions! reset_perishable_token! UserMailer.deliver_password_reset_instructions(self) end |
#has_role?(role_in_question) ⇒ Boolean
has_role? simply needs to return true or false whether a user has a role or not.
29 30 31 32 |
# File 'app/models/user.rb', line 29 def has_role?(role_in_question) @_list ||= self.roles.collect(&:name) (@_list.include?(role_in_question.to_s) ) end |
#last_address ⇒ Object
34 35 36 |
# File 'app/models/user.rb', line 34 def last_address addresses.last end |