Forum: Ruby on Rails RESTful sublist (e.g. open invoices)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Torsten M. (Guest)
on 2008-11-28 16:51
Hi,

i've got a restful ressource named 'invoice'. the index-method shows a
paginated list of all invoices.

now i want to get a new view for all open invoices. i don't know how to
achieve this in most-restful manner.

i considered these options:
* a new collection method for the ressource: 'show_open'
* a get-parameter for the index view: '?only_open=true'

but i'm pretty sure, you guys can come up with a more elegant solution.

i may want to get some more views in the future: 'paid', 'last_month'
This topic is locked and can not be replied to.