[openstreetmap/openstreetmap-website] Add counts for notes and diary comments to user profiles (#1774)
Tom Hughes
notifications at github.com
Thu Mar 1 21:07:39 UTC 2018
tomhughes commented on this pull request.
> @@ -25,7 +25,7 @@
class NoteComment < ActiveRecord::Base
belongs_to :note, :foreign_key => :note_id, :touch => true
- belongs_to :author, :class_name => "User", :foreign_key => :author_id
+ belongs_to :author, :class_name => "User", :foreign_key => :author_id, :counter_cache => :notes_count
What was the reason for overriding the name here? Would the default of `note_comments_count` not be more accurate?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1774#pullrequestreview-100593340
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20180301/a5b5ad6b/attachment-0001.html>
More information about the rails-dev
mailing list