Reputation: 3522
I'm using Rails 4
I have a routes.rb file that looks like:
resources :books
However, I'd like the urls in the application to end up looking like /b/101
instead of /books/101
.
I realize I could go through and rename each resource path individually, but is there not a way to do this by changing the resources
somehow? Kind of like how you can change the params by doing resources :books, params: :new_id
?
Upvotes: 2
Views: 163