#1323: Limit to user show pages

This commit is contained in:
Toks
2013-12-15 19:55:28 -05:00
parent 2411926666
commit 657606cb73
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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