From c57490f48e0e2117e88f7d5be5073e3d4c1fc728 2014-01-10 10:30:57 From: Toshi MARUYAMA Date: 2014-01-10 10:30:57 Subject: [PATCH] cleanup syntax of Relation#all at QueriesController#index git-svn-id: http://svn.redmine.org/redmine/trunk@12602 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/queries_controller.rb b/app/controllers/queries_controller.rb index 8c53f76..076c088 100644 --- a/app/controllers/queries_controller.rb +++ b/app/controllers/queries_controller.rb @@ -31,11 +31,13 @@ class QueriesController < ApplicationController else @limit = per_page_option end - @query_count = IssueQuery.visible.count @query_pages = Paginator.new @query_count, @limit, params['page'] - @queries = IssueQuery.visible.all(:limit => @limit, :offset => @offset, :order => "#{Query.table_name}.name") - + @queries = IssueQuery.visible. + order("#{Query.table_name}.name"). + limit(@limit). + offset(@offset). + all respond_to do |format| format.api end