I was told that if I only have one "thing", like home (not multiple homes), I should use resource :home, not resources :home in routes.rb. But then when I look at routes, the POST function seems to want homes#create. Why plural? I wanted to name my controller home_controller with the class being HomeController. Do I have to name them plural?
Modified quote from http://guides.rubyonrails.org/routing.html#nested-resources:
Because you might want to use the same controller for a singular route (/home) and a plural route (/homes/45), singular resources map to plural controllers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With