I have a two tables joined with a join table - this is just pseudo code:
Library Book LibraryBooks
What I need to do is if i have the id of a l
Perhaps:
l.books.map {|b| b.libraries}
or
l.books.map {|b| b.libraries}.flatten.uniq
if you want it all in a flat array.
Of course, you should really define this as a method on Library, so as to uphold the noble cause of encapsulation.