Let's say I have a routes file like this:
resources :books do
resources :authors
end
So if I want to display the authors of a particular book, that's easy:
/books/1/authors
But what if I wanted to display the authors of all the books? I want something like this:
/books/all/authors
or:
/books/authors
Canonically, I assume it's just /authors but I'm curious if there's another way that's considered standard practice.
EDIT
To clarify, I want routes that look roughly like this:
/books/1/authors
/books/all/authors
So that the route doesn't look dramatically different for when I'm looking at authors for book 1 vs. all book authors, and I want to differentiate displaying authors outside of the context of books vs. with the context of books. So, simply having a resources :authors and a AuthorsController#index does not solve my question.
(Let's assume I don't want to have a /views/authors/index.html file)