diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-11-30 16:57:56 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-11-30 16:57:56 +0000 |
commit | e7b6a56a972eaed14386d737929f84a7ef59e9a5 (patch) | |
tree | c50137923b3a42c1e894fc0896554e2f4bbb33dd /app/controllers | |
parent | 957269930159ddde35324d0666678753ff4bff0b (diff) | |
download | redmine-e7b6a56a972eaed14386d737929f84a7ef59e9a5.tar.gz redmine-e7b6a56a972eaed14386d737929f84a7ef59e9a5.zip |
Replaces User.find_active with a named scope.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2079 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/account_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/application.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects_controller.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index f327dd5b6..fe44740a4 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -24,7 +24,7 @@ class AccountController < ApplicationController # Show user's account def show - @user = User.find_active(params[:id]) + @user = User.active.find(params[:id]) @custom_values = @user.custom_values # show only public projects and private projects that the logged in user is also a member of diff --git a/app/controllers/application.rb b/app/controllers/application.rb index e5719a059..36123ba47 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -46,7 +46,7 @@ class ApplicationController < ActionController::Base def find_current_user if session[:user_id] # existing session - (User.find_active(session[:user_id]) rescue nil) + (User.active.find(session[:user_id]) rescue nil) elsif cookies[:autologin] && Setting.autologin? # auto-login feature User.find_by_autologin_key(cookies[:autologin]) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 43e1ae035..9b3316682 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -227,7 +227,7 @@ class ProjectsController < ApplicationController @date_to ||= Date.today + 1 @date_from = @date_to - @days @with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1') - @author = (params[:user_id] ? User.find_active(params[:user_id]) : nil) + @author = (params[:user_id] ? User.active.find(params[:user_id]) : nil) @activity = Redmine::Activity::Fetcher.new(User.current, :project => @project, :with_subprojects => @with_subprojects, |