NM, it works with a custom named route.
Guest wrote:> Say you have a search route that posts to the create resource in the
> search controller called from the layout RHTML. All is fine until you go
> to a route that takes an ID, say like items/2, and try to do a search
> from there. So the items will change to search but the 2 will be with it
> (search/2) and a routing error will occur:
>
> Routing Error
>
> no route found to match "/search/2" with {:method=>:post}
>
>
> So to be thorough, in my application.rhtml layout that is in place for
> every controller, I have for_form :search, :url => search_url, and that
> causes a routing issue from URLs that have a value being passed in.
>
> Any help would be great!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---