mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
caching comment counts
This commit is contained in:
parent
89840d0bab
commit
9c6286182e
5 changed files with 36 additions and 2 deletions
|
|
@ -8,7 +8,7 @@ class Comment < ActiveRecord::Base
|
|||
# want user to vote on the quality of comments.
|
||||
#acts_as_votable
|
||||
|
||||
belongs_to :commentable, polymorphic: true
|
||||
belongs_to :commentable, counter_cache: true, polymorphic: true
|
||||
|
||||
# NOTE: Comments belong to a user
|
||||
belongs_to :user
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue