Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

generation of url #85

Open
fij0 opened this issue Dec 20, 2011 · 1 comment
Open

generation of url #85

fij0 opened this issue Dec 20, 2011 · 1 comment

Comments

@fij0
Copy link

fij0 commented Dec 20, 2011

hello, im using metasearch and i need use the metasearch form but with a pre filter that i have thanks to a params, in easy words, metasearch generate this url
http://localhost:3000/libros?utf8=%E2%9C%93&search%5Bnro_iden_equals%5D=9&search%5Bnro_trans_equals%5D=&search%5B&commit=Buscar
And i need generate an url like this
http://localhost:3000/libros?pieza_id=9?utf8=%E2%9C%93&search%5Bnro_iden_equals%5D=9&search%5Bnro_trans_equals%5D=&search%5B&commit=Buscar

It is posible this ?
Sorry about my writing , my inglish is poor

Thanks

@pdabrowski6
Copy link

@fij0 how about creating hidden field which contains your filter? But don't forget to create empty scope in your model otherwise meta_search will generate error because you don't have that kind of search method definied.

It looks like this in your model:

 search_methods [...] :pieza_id

After putting this into your model and creating hidden field you should be able to use params[:search][:pieza_id] variable

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants