LEFT OUTER JOIN with ARel
15 Nov 2012Found this post very helpful, so bookmarking here on my blog.
Basic idea is to use .includes(:assoc) instead of joins. Squeel supports a little cleaner DSL so you can do .join(:assoc.outer)
Found this post very helpful, so bookmarking here on my blog.
Basic idea is to use .includes(:assoc) instead of joins. Squeel supports a little cleaner DSL so you can do .join(:assoc.outer)