Howdy I found plenty of examples on how to use LEFT OUTER JOIN, but I can't seem to find a way to access what I have joined. Here is what I mean:
List.featured.
joins(
"LEFT OUTER JOIN follows ON (
follows.followable_id = lists.id AND
follows.followable_type = 'List' AND
follows.user_id = #{current_user.id})"
).map { |list|
list.follows # <-- returns all follows, not only the ones from current_user
...
In the example I get the follows (it seems) with the join, but then how can I access them? The follows
relation will just give me all follows for that list it seems.
Or maybe my mind is fogged :) Thanks!