Add commentary changes link to profiles

This commit is contained in:
Toks
2013-11-22 09:03:52 -05:00
parent 19125bf2ee
commit 6e8afed135
3 changed files with 15 additions and 2 deletions

View File

@@ -524,7 +524,7 @@ class User < ActiveRecord::Base
options[:except] ||= []
options[:except] += hidden_attributes
options[:methods] ||= []
options[:methods] += [:wiki_page_version_count, :artist_version_count, :pool_version_count, :forum_post_count, :comment_count, :appeal_count, :flag_count, :positive_feedback_count, :neutral_feedback_count, :negative_feedback_count]
options[:methods] += [:wiki_page_version_count, :artist_version_count, :artist_commentary_version_count, :pool_version_count, :forum_post_count, :comment_count, :appeal_count, :flag_count, :positive_feedback_count, :neutral_feedback_count, :negative_feedback_count]
super(options)
end
@@ -534,7 +534,7 @@ class User < ActiveRecord::Base
options[:except] ||= []
options[:except] += hidden_attributes
options[:methods] ||= []
options[:methods] += [:wiki_page_version_count, :artist_version_count, :pool_version_count, :forum_post_count, :comment_count, :appeal_count, :flag_count, :positive_feedback_count, :neutral_feedback_count, :negative_feedback_count]
options[:methods] += [:wiki_page_version_count, :artist_version_count, :artist_commentary_version_count, :pool_version_count, :forum_post_count, :comment_count, :appeal_count, :flag_count, :positive_feedback_count, :neutral_feedback_count, :negative_feedback_count]
super(options, &block)
end
@@ -557,6 +557,10 @@ class User < ActiveRecord::Base
ArtistVersion.for_user(id).count
end
def artist_commentary_version_count
ArtistCommentaryVersion.for_user(id).count
end
def pool_version_count
PoolVersion.for_user(id).count
end