all I can think of is that order of routes matters, and there may be a conflict with the default :controller:action scheme. try moving it up the list, but be careful that it doesn’t break the rest of your routes.
Well, besides connect being spelt with three n's I don' think that
there is anything wrong with your code. And rails is behaving exactly
as expected too.
When the form is created, I believe that rails will generate html like
this (it did when I looked at your code);
<form action="/products/search" method="get">
<input id="term" name="term" type="text" value="fred" />
<input type="submit" value="search" />
So, "term" is supposed to vary depending upon what the user keys in
but then "term" is also supposed to appear into the html before the
user types in anything. I don't think that there is much change of
that working. The URL generated from the form is fine.
http://localhost:3004/products/search?term=something is correct.
The routing is working. You can see this if add some code to the
search.rthml view that displays the value of the params[:term]. Also a
URL like http://localhost:3004/products/search/here-is-my-term works.
params[:term] is set to "here-is-my-term" in the search method of the
controller. When the user then keys in a value into the form and
clicks the submit button, the URL becomes
Maybe dropping the route and just letting the form do it's thing is
the simplest way forward?