Fix merge error when Equality LHS is non-attribute. #11563

Merged
merged 1 commit into from Jul 23, 2013

Conversation

Projects
None yet
3 participants

90yukke commented Jul 22, 2013

This is reworking of rails/rails#7380 made for rails 3.

Owner

rafaelfranca commented Jul 22, 2013

Thank you for the contribution @90yukke. Could you add a CHANGELOG entry?

90yukke commented Jul 23, 2013

CHANGELOG entry added.

rafaelfranca added a commit that referenced this pull request Jul 23, 2013

Merge pull request #11563 from 90yukke/fix-nomethoderror-on-non-attri…
…bute-equalities

Fix merge error when Equality LHS is non-attribute.

@rafaelfranca rafaelfranca merged commit c4b93f5 into rails:3-2-stable Jul 23, 2013

1 check was pending

default The Travis CI build is in progress
Details

bjones commented Nov 21, 2013

For anyone else arriving here due to this on Rails 3.1, you can also just call .to_sql() on the relation and use that in the where clause instead, where(Arel::Nodes::NamedFunction.new('LOWER', [arel_table[:name]]).eq(name.downcase).to_sql)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment