diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/queries_controller.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/controllers/queries_controller.rb b/app/controllers/queries_controller.rb index 8c53f76ef..076c0883d 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 |