-
-
Notifications
You must be signed in to change notification settings - Fork 810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom search parameter key changing.. not working #92
Comments
I forked it and check it locally ( debugger in Search initialize ) ... running fine I can have y 2 tabs , with 2 search keys... so using gem 'ransack' custom search parameter key changing doesn't work so gem ransack (0.6.0) doesn't work .. |
Not working for me... Here is my ransack.rb initializeer code: Ransack.configure do |config| And my controller: @search = User.ransack(params[:query], :search_key => :query) |
Not working for me either. I'm migrating from MetaSearch and wanted to set the Ransack search_key to :search, but no luck. Adding the Ransack initializer file, and setting the configuration to use config.search_key = :search, still ends up using a search_key of :q. I've restarted the server to pick up the new initializer, but no luck. I'm using version 0.7.0 |
@gladgit Did you manage to get this config value working? I'm having the same issue, migrating from meta_search. |
@qnm Unfortunately, no. Had to give up on Ransack altogether due to additional issues with it, and time constraints on getting it working. |
@qnm With what did you replace it? |
I just reverted to MetaSearch. But that is only supported for Rails 3.1, which is OK for the moment, but I'll have to address this again soon. |
I have the same problem. |
Why was this closed? |
@ascoppa It was closed by the original poster. If you're also seeing this problem, please open a new issue and provide the information from the Contributing Guide |
I have defined ( as stated in the doc) :
in my controller :
@search_tasks = Task.search(params[:tasks_search], :search_key => :tasks_search)
in my view :
%td= sort_link @search_tasks, :deadline, Task.human_attribute_name(:deadline), {:tasks_page => @tasks_page}, :remote => true
but when click on the sort link, I still get the :q parameter :
params : {"q"=>{"s"=>"deadline asc"}, "tasks_page"=>"1", "action"=>"show", "controller"=>"backoffice/dashboards"}
what could be wrong ?
the generated html link is :
Echéance
The text was updated successfully, but these errors were encountered: