rails/rails — pull request #7380 by ernie (2012-08-17 15:43:10+00:00)
Title: Fix merge error when Equality LHS is non-attribute

This is at best a band-aid for a more proper fix, since it won't truly
handle the removal of the previous equality condition of these other
nodes. I'm planning to put in some work on ARel toward supporting that
goal. I'd like to also backport this fix to the 3.x merge code, unless
there are objections.

Related: rails/arel#130, ernie/squeel#153, ernie/squeel#156

Also, I added a test for the more typical equality condition, since
I didn't see one for it yet. Maybe I missed it, since the PredicateBuilder
does create equality nodes in stock AR with a hash, but
the only one I noticed was using order and strings to test.