From 657606cb7342a097921cd1627ae47725f37da88f Mon Sep 17 00:00:00 2001 From: Toks Date: Sun, 15 Dec 2013 19:55:28 -0500 Subject: [PATCH] #1323: Limit to user show pages --- app/controllers/users_controller.rb | 2 +- app/models/user.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index a9a148df4..5141f955b 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -34,7 +34,7 @@ class UsersController < ApplicationController def show @user = User.find(params[:id]) @presenter = UserPresenter.new(@user) - respond_with(@user) + respond_with(@user, :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]) end def create diff --git a/app/models/user.rb b/app/models/user.rb index 91b76fa57..b37409996 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] += [:level_string, :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] + options[:methods] += [:level_string] super(options) end @@ -534,7 +534,7 @@ class User < ActiveRecord::Base options[:except] ||= [] options[:except] += hidden_attributes options[:methods] ||= [] - options[:methods] += [:level_string, :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] + options[:methods] += [:level_string] super(options, &block) end