I have this search controller url:
http://localhost:3000/search/index?utf8=✓&search=Search_terms
how can trim this to:
http://localhost:3000/search=query
the search code:
#search-box
#search-form
= form_tag search_index_path, :method => 'get' do
= text_field_tag :search, params[:search], :autocomplete => "off"
%button#search-button{:type => "submit"}
%span Go!
Or is that possible??
Please advise.
This is not possible by Ruby (or Rails) itself. You need to
search=+ input value.Keep in mind that not all characters can be part of an URL. This is the reason why you should pass the search query as parameter, not as part of the URI.