I have a problem with quiet routes and unique resources, initially I had this code in the show view on my account resource.
<%= link_to book.title, book_path(:search => book.title) %>
and it worked fine, then I changed the account as a special resource, for example
from
map.resources :accounts
to
map.resource :account
and now I get an error ...
book_url failed to generate from {:search=>"Dracula", :controller=>"books", :action=>"show"}, expected: {:controller=>"books", :action=>"show"}, diff: {:search=>"Dracula"}
delete the line of code presentation, and everything will be fine. Also changing it to
<%= link_to book.title, :controller => "books", :action => "show", :search => book.title %>
makes you work.
I created a standalone rails application that demonstrates my problem in isolation http://github.com/jowls/singular_resource_bug
This is mistake? caused by some combination of special resources and quiet routes?
It was on rails 2.3.10
thank
source
share