Class: Nightlight::Activity
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Nightlight::Activity
- Defined in:
- app/models/nightlight/activity.rb
Instance Method Summary collapse
Instance Method Details
#checked? ⇒ Boolean
24 25 26 |
# File 'app/models/nightlight/activity.rb', line 24 def checked? name=='checked' end |
#status? ⇒ Boolean
21 22 23 |
# File 'app/models/nightlight/activity.rb', line 21 def status? name=='status' end |
#to_s ⇒ Object
13 14 15 |
# File 'app/models/nightlight/activity.rb', line 13 def to_s "#{user_name} #{verb_phrase}".humanize end |
#user_name ⇒ Object
17 18 19 |
# File 'app/models/nightlight/activity.rb', line 17 def user_name user.try(:name) || 'someone' end |