This project is archived and is in readonly mode.

#4089 ✓resolved
Mislav

Rails 3 forces singleton resource names to be a singular word

Reported by Mislav | March 2nd, 2010 @ 07:10 AM | in 3.0.2

I want a resource named "preferences" in Rails 3, but current routing implementation forces singleton resource names to singular form regardless of if they were specified in plural. In this example:

resource :preferences

generates these helpers: admin_preference, new_admin_preference, edit_admin_preference (notice the singular form)

Accordingly, the URLs for this resource are in the "/preference/*" form.

For now, I'm using this workaround to fix the URLs:

resource :preferences, :as => :preferences

But the generated URL helpers stay in singular form.

In Rails 2.3.x it was possible to have a singleton route named with a plural word.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages