Using named routes with parameters and form_tag
问题 I'm trying to create a simple search form in Rails, but I think I'm missing something. I have a named route for search: map.search ":first_name/:last_name", :controller => "home", :action => "search" I'm trying to use that in my search form: <% form_tag(search_path, :method => 'get') do %> <%= text_field_tag(:first_name) %> <%= text_field_tag(:last_name) %> <%= submit_tag("Search") %> <% end %> But when I load up the search form I get an ActionController::RoutingError: search_url failed to