Class: Hub::Topic
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Hub::Topic
- Includes:
- SoftDelete, Uid
- Defined in:
- app/models/hub/topic.rb
Instance Method Summary collapse
Methods included from SoftDelete
Instance Method Details
#activity_at ⇒ Object
34 35 36 |
# File 'app/models/hub/topic.rb', line 34 def activity_at replied_at || updated_at || created_at end |
#set_last_active_mark ⇒ Object
24 25 26 |
# File 'app/models/hub/topic.rb', line 24 def set_last_active_mark self.last_active_mark = Time.now.to_i end |
#set_show_in_recent ⇒ Object
29 30 31 32 |
# File 'app/models/hub/topic.rb', line 29 def set_show_in_recent Topic.where(customer: customer).update_all(show_in_recent: false) update_column('show_in_recent', true) end |