I’m working with a database that has a lot of linked model objects and I’m wondering, if I have a model object called “User” and users can have “Applications” linked to them, what is the easiest way to get the array of all Applications linked to a given array of Users?
For example, if I had a specific subset of Users:
@users = User.find_all_by_favorite_color("Green")
@applications = @users.applications # What is the right call here?
1 Answer