I have two models: Books and Chapters, where book has many chapters. I've set up the route like:
match 'book/:book_title/:chapter/:chapter_title' => 'chapter#show', :as => "chapter"
and the delegation to the Chapters controller, action show works fine.
The problem for me now is to retrieve that chapter in the show controller through the book. How this is done in case the identifiers for the query are not the primary keys?
Thanks!