We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think it will be useful to be able to use counter_cache with acts_as_commentable, could save a lot of processing time on large sites
The text was updated successfully, but these errors were encountered:
Should work smoothly like normal
add_column :projects, :comments_count, :integer, :default => 0 Project.all.find_each do |p| Project.update_counters p.id, :comments_count => p.root_comments.length end
then in comment.rb
belongs_to :commentable, :polymorphic => true, :counter_cache => :comments_count
Sorry, something went wrong.
No branches or pull requests
I think it will be useful to be able to use counter_cache with acts_as_commentable, could save a lot of processing time on large sites
The text was updated successfully, but these errors were encountered: