From 4e3edccaf55aa15b8b9ad9c97549421b0c430525 Mon Sep 17 00:00:00 2001 From: okkez Date: Thu, 23 Jun 2016 23:18:21 +0900 Subject: [PATCH 1/2] Add `params` to `Redmine::Search::Fetcher#initialize` optional parameter Because I want to customize search query using extra params such as: * `order by updated_at desc` * `order by updated_at asc` * `order by score desc` * `order by score asc` --- app/controllers/search_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 2888a88..36f4b1f 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -68,7 +68,7 @@ class SearchController < ApplicationController fetcher = Redmine::Search::Fetcher.new( @question, User.current, @scope, projects_to_search, :all_words => @all_words, :titles_only => @titles_only, :attachments => @search_attachments, :open_issues => @open_issues, - :cache => params[:page].present? + :cache => params[:page].present?, params: params ) if fetcher.tokens.present? -- 2.8.1