Reputation: 51
I have a Rails 3 app with a url like this: /books/1/pages/2
I want this to actually point to the Books
controller but with a page_id
param, rather than the Pages
controller with the book_id
param. Is this possible?
Upvotes: 0
Views: 56
Reputation: 14205
In routes.rb: match '/books/:id/pages/:page_id' => 'books#your_action'
Upvotes: 2