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!