Mercurial > hg > soundsoftware-site
comparison app/controllers/queries_controller.rb @ 1517:dffacf8a6908 redmine-2.5
Update to Redmine SVN revision 13367 on 2.5-stable branch
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:29:00 +0100 |
parents | e248c7af89ec |
children |
comparison
equal
deleted
inserted
replaced
1516:b450a9d58aed | 1517:dffacf8a6908 |
---|---|
29 when 'xml', 'json' | 29 when 'xml', 'json' |
30 @offset, @limit = api_offset_and_limit | 30 @offset, @limit = api_offset_and_limit |
31 else | 31 else |
32 @limit = per_page_option | 32 @limit = per_page_option |
33 end | 33 end |
34 | |
35 @query_count = IssueQuery.visible.count | 34 @query_count = IssueQuery.visible.count |
36 @query_pages = Paginator.new @query_count, @limit, params['page'] | 35 @query_pages = Paginator.new @query_count, @limit, params['page'] |
37 @queries = IssueQuery.visible.all(:limit => @limit, :offset => @offset, :order => "#{Query.table_name}.name") | 36 @queries = IssueQuery.visible. |
38 | 37 order("#{Query.table_name}.name"). |
38 limit(@limit). | |
39 offset(@offset). | |
40 all | |
39 respond_to do |format| | 41 respond_to do |format| |
40 format.api | 42 format.api |
41 end | 43 end |
42 end | 44 end |
43 | 45 |