Class: Person

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/person.rb

Direct Known Subclasses

Administrator, User

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.find_by_login_or_email(login) ⇒ Object



9
10
11
# File 'app/models/person.rb', line 9

def self.()
 find_by_email()
end

Instance Method Details

#activateObject

Activates the user in the database.



47
48
49
# File 'app/models/person.rb', line 47

def activate
  update_attribute(:active, true)
end

#disactivateObject

Disactivates the user in the database.



42
43
44
# File 'app/models/person.rb', line 42

def disactivate
  update_attribute(:active, false)
end

#fullnameObject



37
38
39
# File 'app/models/person.rb', line 37

def fullname
  "#{lastname} #{firstname}"
end