Has_many_polymorphs + has_many_through joins?

Hello there,

I have a user model, which has man relationships to other users via a
hmt association.

Then there is a hmp association (user.items) from each user to lots of
different other models (e.g. images, videos, etc).

Now how do I get all (or the last 25 etc) .items from a users related
users?

user.relationships gives x users
e.g. user.relationships[0] gives y items. but how do I get all .items
from all .relationships?

I am kinda lost at the moment :frowning: Any ideas / suggestions?

-J

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs