How do I apply the Law of Demeter to this?
问题 I have an admittedly ugly query to do, to find a particular role related to the current role. This line produces the correct result: @person_event_role.event_role.event.event_roles. joins(:mission_role).where(:mission_roles => {:title => 'Boss'}). first.person_event_roles.first.person (You can infer the associations from the plurality of those calls) The only way to get this information requires a ton of knowledge of the structure of the database, but to remove the coupling... It would