Class: Person
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Person
- Defined in:
- app/models/person.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
-
#activate ⇒ Object
Activates the user in the database.
-
#disactivate ⇒ Object
Disactivates the user in the database.
- #fullname ⇒ Object
Class Method Details
.find_by_login_or_email(login) ⇒ Object
9 10 11 |
# File 'app/models/person.rb', line 9 def self.find_by_login_or_email(login) find_by_email(login) end |
Instance Method Details
#activate ⇒ Object
Activates the user in the database.
47 48 49 |
# File 'app/models/person.rb', line 47 def activate update_attribute(:active, true) end |
#disactivate ⇒ Object
Disactivates the user in the database.
42 43 44 |
# File 'app/models/person.rb', line 42 def disactivate update_attribute(:active, false) end |
#fullname ⇒ Object
37 38 39 |
# File 'app/models/person.rb', line 37 def fullname "#{lastname} #{firstname}" end |