Forum: Ruby on Rails REST nested resources and resource design

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.
3092831491e0e9f9d654fbc080ceca91?d=identicon&s=25 cjharrelson (Guest)
on 2007-06-12 05:27
(Received via mailing list)
I have a situation where an account belongs_to account_type and
account_type has_many accounts.  Obviously, I also have an
AccountTypeController and an AccountController.

I am trying to get a list of all accounts that are of account type
'user' without breaking the REST conventions.  What is the best way to
achieve this?

I could accept an account_type parameter in the index action of the
AccountController and limit the list by this if it is present.

It also seems like I could go through the the AccountTypeContoller to
achieve this, but I am at a loss for how.

Thank you in advance for your help!
This topic is locked and can not be replied to.