diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-01-19 14:14:24 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-01-19 15:19:43 -0700 |
commit | 40887135f6c4e7e9feee03b4dac791ec1d54b3c6 (patch) | |
tree | 9eada969dd536c75b9ed31efbff859b33cf43865 /activerecord/test/cases/relation | |
parent | 76d7d957900d8fe297c027604ae5d8364b3389d6 (diff) | |
download | rails-40887135f6c4e7e9feee03b4dac791ec1d54b3c6.tar.gz rails-40887135f6c4e7e9feee03b4dac791ec1d54b3c6.tar.bz2 rails-40887135f6c4e7e9feee03b4dac791ec1d54b3c6.zip |
Whether a column exists or not doesn't affect whether we can use binds
Looking through the blame, this logic used to be when we actually
created the bind tuple. My guess is that `nil` couldn't be handled there
at that time. It can, now.
Diffstat (limited to 'activerecord/test/cases/relation')
-rw-r--r-- | activerecord/test/cases/relation/where_chain_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/relation/where_chain_test.rb b/activerecord/test/cases/relation/where_chain_test.rb index 619055f1e7..0f9019bb1b 100644 --- a/activerecord/test/cases/relation/where_chain_test.rb +++ b/activerecord/test/cases/relation/where_chain_test.rb @@ -42,7 +42,7 @@ module ActiveRecord end def test_association_not_eq - expected = Comment.arel_table[@name].not_eq('hello') + expected = Comment.arel_table[@name].not_eq(Arel::Nodes::BindParam.new) relation = Post.joins(:comments).where.not(comments: {title: 'hello'}) assert_equal(expected.to_sql, relation.where_values.first.to_sql) end |