In 2.3.1 (and before), there is a subtle difference in the
handling of certain irregular plurals between RESTful routing and
polymorphic_url. This shows up any time that you have inflections
that do not round-trip between singular and plural. For example,
out of the box Rails inflections include:
"tax".pluralize => "taxes"
"taxes".singularize => "taxis"
In this situation, some things will fail to work as expected.
With the routes entry:
map.resources :taxes
A simple call to redirect_to @tax with a Tax object will fail,
because (ultimately) routing uses the singularized pluralized name
and polymorphic_url uses the singular name.
Attached patch corrects this situation so that polymorphic_url
will work correctly on these names - in this particular case, it
would redirect to (the correct) taxis_url instead of (the
incorrect) tax_url.
Applying this patch is a prerequisite to getting a good fix for
#2046 Strange pluralize and routing/