Reputation: 267220
My account_controller has the following actions:
/accounts/index /accounts/show/12321 /accounts/edit/234234
I have this so far in my routes file:
get "accounts/index"
match "accounts/show/:id" => "accounts#show"
Can I use resources instead somehow?
Currently my accounts#index
routes doesn't work if you have a url like:
/accounts/
Upvotes: 0
Views: 21
Reputation: 14983
Using resources
would change your URL structure:
But the action names in the controller would stay the same.
If you don't mind losing the old URLs, or if you could set up redirects from the old URLs to the new ones, then using resources
would result in a more conventional, RESTful design, so it's "better" by that standard.
Upvotes: 1