I'm having a problem deploying my rails app.
The thing is that, not being in English, I add the pluralization to the Inflector,eg:
Inflector.inflections do |inflect|
inflect.irregular 'sing', 'plur'
end
And in the routes.rb:ActionController::Routing::Routes.draw do |map|
map.resources :plur
end
I get the following error:ActionView::TemplateError (plur_url failed to generate from {:controller=>"plur", :action=>"show"} - you may have ambiguous routes, or you may need to supply additional parameters for this route. content_url has the following required parameters: ["plur", :id] - are they all satisifed?) on line #10 of app/views/layouts/application.rhtml:
10: <%= link_to "Plur", plur_path %>
11: </li>
I'm confident that the problem is related to the Inflector because if I change the routes.rb toActionController::Routing::Routes.draw do |map|
map.resources :plur, :singular => "sing", :plural => "plur"
end
it works again (and the problem only appears with the irregularly inflected words).Does someone have a clue why this happens?
(Of course I can leave the :singular and :plural bits in the routes.rb, but I'd like to know why this happens.)