Class: Homeland::Reply
- Inherits:
-
Object
- Object
- Homeland::Reply
- Includes:
- Mongoid::Document, Mongoid::Paranoia, Mongoid::Timestamps
- Defined in:
- app/models/homeland/reply.rb
Instance Method Summary collapse
Instance Method Details
#update_parent_last_replied ⇒ Object
22 23 24 25 26 27 |
# File 'app/models/homeland/reply.rb', line 22 def update_parent_last_replied self.topic.replied_at = Time.now self.topic.last_reply_user_id = self.user_id self.topic.replies_count = self.topic.replies.count self.topic.save end |