Rails guides show the following example as a generic search form.
<%= form_tag(search_path, :method => "get") do %>
<%= label_tag(:q, "Search for:") %>
<%= text_field_tag(:q) %>
<%= submit_tag("Search") %>
<% end %>
Things work fine but, if I want to find something that has “251”, the resulting url from the above looks like
app.com/searches?utf8=✓&keywords=251
How should I modify the code such that the resulting url will look something like
app.com/searches/251
How about redirecting from the search action if the param[:keywords] exists like this:
Depending on how your routes are setup.