Module: Likeable
- Extended by:
- ActiveSupport::Concern
- Included in:
- Argument
- Defined in:
- app/models/concerns/likeable.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#update_likes_counter ⇒ Object
27 28 29 |
# File 'app/models/concerns/likeable.rb', line 27 def update_likes_counter self.class.where(id: self.id).update_all likes_count: self.likes.count, dislikes_count: self.dislikes.count end |