Give that I have a model called Apple
and it has a controller ApplesController
, the routes are:
resources :apples
apples GET
For those seeking only to rename the helper method part:
resources :apples, as: "cars"
I.e. this would replace apples_path
with cars_path
, but still using the same controller/action.
What you will want to do is pass in the :path
option
resources :apples, :path => "cars"
This replace all your route references with /apples
to /cars
See: http://guides.rubyonrails.org/routing.html, Section 4.7 Translating Paths