diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-17 18:23:30 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-17 18:23:30 +0000 |
commit | 85fb937a4ef0429924163b6c6ea17ed6027c81c9 (patch) | |
tree | f434034c6c38be29244c1b823b50bfa9a4291bd4 | |
parent | 1cf379f370def8e843975b5b7f0610207cac369b (diff) | |
download | redmine-85fb937a4ef0429924163b6c6ea17ed6027c81c9.tar.gz redmine-85fb937a4ef0429924163b6c6ea17ed6027c81c9.zip |
Use scoped models for pagination.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11027 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/controllers/issue_statuses_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/roles_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/trackers_controller.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/issue_statuses_controller.rb b/app/controllers/issue_statuses_controller.rb index ddaf9304d..b24befd5b 100644 --- a/app/controllers/issue_statuses_controller.rb +++ b/app/controllers/issue_statuses_controller.rb @@ -25,7 +25,7 @@ class IssueStatusesController < ApplicationController def index respond_to do |format| format.html { - @issue_status_pages, @issue_statuses = paginate :issue_statuses, :per_page => 25, :order => "position" + @issue_status_pages, @issue_statuses = paginate IssueStatus.sorted, :per_page => 25 render :action => "index", :layout => false if request.xhr? } format.api { diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb index 292304260..b8a046a99 100644 --- a/app/controllers/roles_controller.rb +++ b/app/controllers/roles_controller.rb @@ -26,7 +26,7 @@ class RolesController < ApplicationController def index respond_to do |format| format.html { - @role_pages, @roles = paginate :roles, :per_page => 25, :order => 'builtin, position' + @role_pages, @roles = paginate Role.sorted, :per_page => 25 render :action => "index", :layout => false if request.xhr? } format.api { diff --git a/app/controllers/trackers_controller.rb b/app/controllers/trackers_controller.rb index 602ea5288..2811929fa 100644 --- a/app/controllers/trackers_controller.rb +++ b/app/controllers/trackers_controller.rb @@ -25,7 +25,7 @@ class TrackersController < ApplicationController def index respond_to do |format| format.html { - @tracker_pages, @trackers = paginate :trackers, :per_page => 10, :order => 'position' + @tracker_pages, @trackers = paginate Tracker.sorted, :per_page => 10 render :action => "index", :layout => false if request.xhr? } format.api { |