On Mar 8, 10:44 am, "Todd A. Jacobs" <codegnome.consult...@gmail.com> wrote: > I have a controller and view that should be providing a search bar > that brings up that brings up a selected record on submission. I have > tried several variations, including just specifying the assets_path, > but usually end up with either an error or a submission to the index > action, rather than the show action. Currently, I have the following > in my index.html.haml: > > = form_tag({:controller => 'assets', :action => 'show'}, :method > => :GET) do > .field > =label_tag('Job > Number').titleize > > %br/ > > =number_field_tag :id > .actions > =submit_tag 'Search', :name => nil > > This gives me the following error: > > No route matches {:controller=>"assets", :action=>"show"}
Routing happens based on the url, not on form parameters. You might try posting to a search action that would bounce them to the appropriate show action. Equally you could wire up some javascript to craft the correct url client side. Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.