Class: Homeland::Reply
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Homeland::Reply
- Defined in:
- app/models/homeland/reply.rb
Instance Method Summary collapse
Methods included from Concerns::UserDelegates
Methods included from Concerns::Markup
Methods included from Concerns::SoftDelete
Instance Method Details
#update_topic_last_reply_at ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'app/models/homeland/reply.rb', line 20 def update_topic_last_reply_at return if self.topic.blank? self.topic.replied_at = Time.now self.topic.last_active_mark = Time.now.to_i self.topic.last_reply_user_id = self.user_id self.topic.replies_count = self.topic.replies.count self.topic.save end |