diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-03 21:30:10 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-03 21:30:10 +0000 |
commit | ea296a109a8655ea48c02c1d0a9bb0d19002d236 (patch) | |
tree | 08b5e517e77e341cfdd5a23d649dd1e754074dd4 /app/controllers/admin_controller.rb | |
parent | a7023dfa9b8e39e6e0a73e57d22823e8a4260b71 (diff) | |
download | redmine-ea296a109a8655ea48c02c1d0a9bb0d19002d236.tar.gz redmine-ea296a109a8655ea48c02c1d0a9bb0d19002d236.zip |
Replaces find(:first/:all) calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10931 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/admin_controller.rb')
-rw-r--r-- | app/controllers/admin_controller.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index e8cccca85..a7a1b9a14 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -32,10 +32,9 @@ class AdminController < ApplicationController def projects @status = params[:status] || 1 - scope = Project.status(@status) + scope = Project.status(@status).order('lft') scope = scope.like(params[:name]) if params[:name].present? - - @projects = scope.all(:order => 'lft') + @projects = scope.all render :action => "projects", :layout => false if request.xhr? end |