ruby on rails - Simple search form passing the searched string through GET -


After submitting, I need my search form to return the following URL:

/ Anuncios / buscar / the_text_i_searched

My form is as follows:

   & Lt; Div class = "basicSearch_button" & gt; & Lt; Input type = "submit" value = "BUSCAR" class = "basicSearch_buttonbutton" /> & Lt; Br / & gt; & Lt; A href = "#" onclic = "javascript: jquery ('# advance'). Modal ({obscurity: 60});" & Gt; Baskawada deprecation & lt; / A & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt;% end% & gt;  

The path to my path is for search_path:

  map.search '/ anuncios / buscar /: str_search' ,: admin = & gt; 'Announcements',: Action => 'Search'  

Well, if I want a URL in the brush manually, it will work, but of course, if you look at the form URL, : TxtSearch "parameter, which is not giving me the actual value of the text field when the form is presented. And that's what I want!

Can anyone help me on this?

You should be able to do this in the administrator:

  def Search ... redirect_to search_path (: str_search = & gt; parameter [: txtSearch]) end  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -