#129 new

Change default name of params[:search]

Reported by lewy313 | November 2nd, 2010 @ 09:11 AM

In my project I need two separate Search in same action. I monkey_patch searchlogic and change form_for to


Now I can use this like.

def action
@search_a = Model.search(params[:a]) @search_b = Model.search(params[:b]) end


form_for @search_a, :params_name => :a do |f| end

form_for @search_b, :params_name => :b do |f| end

Everything works fine except that. When I use search_a and then search_b I loose my previous search parameters. I need to pass additional parameters to :url => {} in form_for.

When I create in my view normal url_for({:action => "index", :foo => :bar})I get

If I try use this in searchlogic form_for like

form_for @search_b, :params_name => :b, :url({:action => "index", :foo => :bar})
only :action => "index" is pass. I think Searchlogic in some place delete :foo => :bar

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Provides common named scopes and object based searching.

People watching this ticket