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/users_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/users_controller.rb')
-rw-r--r-- | app/controllers/users_controller.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 239bd290e..e6702a971 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -47,10 +47,7 @@ class UsersController < ApplicationController @user_count = scope.count @user_pages = Paginator.new self, @user_count, @limit, params['page'] @offset ||= @user_pages.current.offset - @users = scope.find :all, - :order => sort_clause, - :limit => @limit, - :offset => @offset + @users = scope.order(sort_clause).limit(@limit).offset(@offset).all respond_to do |format| format.html { |