I was running into a situation on a production app where we were doing a join on a subquery, and we were getting an undefined method 'on' for Arel::Node::TableAlias with the following structure:
I added this patch, and that allowed the second query to proceed and generate the correct SQL to hit the database. I thought it would be helpful to create a pull request, especially as it appears that this might be what was trying to be done in #46?
Coverage decreased (-3.9%) to 95.126% when pulling 7f5103c3f953a08f29c84768e259c8760059da36 on CodingAnarchy:table-alias-on into a71a46290f49261071031b3f5a868d574f2e96c8 on rzane:master.
Coverage decreased (-4.4%) to 94.605% when pulling 7f5103c3f953a08f29c84768e259c8760059da36 on CodingAnarchy:table-alias-on into a71a46290f49261071031b3f5a868d574f2e96c8 on rzane:master.
I was running into a situation on a production app where we were doing a join on a subquery, and we were getting an
undefined method 'on' for Arel::Node::TableAlias
with the following structure:I added this patch, and that allowed the second query to proceed and generate the correct SQL to hit the database. I thought it would be helpful to create a pull request, especially as it appears that this might be what was trying to be done in #46?