diff --git a/app/models/user.rb b/app/models/user.rb index 3e5046596..371d1601c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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 diff --git a/app/presenters/user_presenter.rb b/app/presenters/user_presenter.rb index 980a6be4b..5f08c3fbd 100644 --- a/app/presenters/user_presenter.rb +++ b/app/presenters/user_presenter.rb @@ -121,6 +121,10 @@ class UserPresenter template.link_to(user.artist_version_count, template.artist_versions_path(:search => {:updater_id => user.id})) end + def artist_commentary_version_count(template) + template.link_to(user.artist_commentary_version_count, template.artist_commentary_versions_path(:search => {:updater_id => user.id})) + end + def forum_post_count(template) template.link_to(user.forum_post_count, template.forum_posts_path(:search => {:creator_id => user.id})) end diff --git a/app/views/users/_statistics.html.erb b/app/views/users/_statistics.html.erb index 7a40a069f..fdd428d17 100644 --- a/app/views/users/_statistics.html.erb +++ b/app/views/users/_statistics.html.erb @@ -68,6 +68,11 @@