From f9ddb562d58ae98bcc69f74396b028cbc8cce0b1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 12 Jun 2013 19:13:25 +0000 Subject: Cleanup of finders with :conditions option. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11963 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/users_controller.rb') diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 3ea65c7aa..4d89e04f5 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -60,7 +60,7 @@ class UsersController < ApplicationController def show # show projects based on current user visibility - @memberships = @user.memberships.all(:conditions => Project.visible_condition(User.current)) + @memberships = @user.memberships.where(Project.visible_condition(User.current)).all events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 10) @events_by_day = events.group_by(&:event_date) -- cgit v1.2.3