jhund / filterrific

Filterrific is a Rails Engine plugin that makes it easy to filter, search, and sort your ActiveRecord lists.
http://filterrific.clearcove.ca
MIT License
910 stars 124 forks source link

How to make a redirect to the main section when searching? #180

Open afuno opened 5 years ago

afuno commented 5 years ago

I have a search in the navigation. This search is available on any page.

How do I redirect to the right section when searching?

Now if I do a search, for example, on the main page, I will get the following address:

http://localhost:3000/home?utf8=%E2%9C%93&filterrific%5Bsearch_by_query%5D=text&commit=Search

But there are no posts on the /home page. That is, I need to go to the /posts section and look for it already.

How to do it?

cartond commented 5 years ago

This could be handled in the controller, or in JS by going to the new URL with the parameters.