Use scoped models for pagination.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11027 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-12-17 18:23:30 +00:00
parent 1cf379f370
commit 85fb937a4e
3 changed files with 3 additions and 3 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {