One of the big WTF for me is the one related to the requirement of having to use plural controller names when defining a singular resources.
I know that the guide says:
Because you might want to use the same controller for a singular route (
/account) and a plural route (
/accounts/45), singular resources map to plural controllers. So that, for example,
resources :photoscreates both singular and plural routes that map to the same controller (
But at least for me in more than 10 years of using rails this never happened. When I defined a singular resource it was always to set it as a singular resource, without the need of accessing the plural form like in the example (by defining the plural
resources as well).
What are others’ experiences and thoughts? Should a singular resource map to a singular controller name by default, and if someone has that scenario use the
resource :photo, controller: 'photos' to point to the plural controller name?