summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-11 13:28:41 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-11 13:28:41 +0000
commitc74098bbd696f830c85daba5657b6694a8c14825 (patch)
tree529a08f758d3682458aba3512eaddb0e34b6fe72
parent47e723c617fa3b2c4cc2bcc4b4bb594091d04b79 (diff)
downloadredmine-c74098bbd696f830c85daba5657b6694a8c14825.tar.gz
redmine-c74098bbd696f830c85daba5657b6694a8c14825.zip
Don't load user activity for API responses (#18128).
git-svn-id: http://svn.redmine.org/redmine/trunk@13587 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/controllers/users_controller.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index d62bea449..5a41c6dcc 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -68,11 +68,12 @@ class UsersController < ApplicationController
# show projects based on current user visibility
@memberships = @user.memberships.where(Project.visible_condition(User.current)).to_a
- events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 10)
- @events_by_day = events.group_by(&:event_date)
-
respond_to do |format|
- format.html { render :layout => 'base' }
+ format.html {
+ events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 10)
+ @events_by_day = events.group_by(&:event_date)
+ render :layout => 'base'
+ }
format.api
end
end