I have a table I need to eager load however I need an extra condition in
the join clause.
Rails will produce something like this for me
select … from table1 left outer join table2 on table1.table2_id =
table2.id
but what I want is
select … from table1 left outer join table2 on table1.table2_id =
table2.id and table1.some_other_column = 4
Since I don’t see any way to do this using nested includes I tried to
specifify the :joins options instead but then ActiveRecord fails to load
table2 into the association (so that table1.table2 includes what I
selected).