You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So you want to know the target_model of a has many through association if I understand correctly?
If so, you are not missing anything, there is no code traverse the associations like that.
The only code that traverses recursively the associations is the eager loading logic, which the has many through leverages to do its magic.
Let me add a bit of code for that.
changed the title
Reflection: Find out whether a through-association is polymorphic
Reflection: Find the target model of a through association
Jan 8, 2015