summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-10 10:30:57 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-10 10:30:57 +0000
commitc57490f48e0e2117e88f7d5be5073e3d4c1fc728 (patch)
tree071ee9d8bee94064d1a47bfac7d11691fb637262 /app/controllers
parent72715ec78e3552afe2b39668cf66b069fea93c6d (diff)
downloadredmine-c57490f48e0e2117e88f7d5be5073e3d4c1fc728.tar.gz
redmine-c57490f48e0e2117e88f7d5be5073e3d4c1fc728.zip
cleanup syntax of Relation#all at QueriesController#index
git-svn-id: http://svn.redmine.org/redmine/trunk@12602 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/queries_controller.rb8
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