aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relation
diff options
context:
space:
mode:
authorCristian Bica <cristian.bica@gmail.com>2014-09-06 10:25:36 +0300
committerCristian Bica <cristian.bica@gmail.com>2014-09-06 23:46:32 +0300
commit72d1663bc7353813f3ec5f4e841a2243baedb473 (patch)
tree8fdb76e18556fe6c1344170377be2ad529352296 /activerecord/test/cases/relation
parentda2f61947db287b5ba0343905da9316eecfd43f3 (diff)
downloadrails-72d1663bc7353813f3ec5f4e841a2243baedb473.tar.gz
rails-72d1663bc7353813f3ec5f4e841a2243baedb473.tar.bz2
rails-72d1663bc7353813f3ec5f4e841a2243baedb473.zip
Fix query with nested array in Active Record
`User.where(id: [[1,2],3])` was equal to `User.where(id:[1, 2, 3])` in Rails 4.1.x but because of some refactoring in Arel this stopped working in 4.2.0. This fixes it in Rails. [Dan Olson & Cristian Bica]
Diffstat (limited to 'activerecord/test/cases/relation')
-rw-r--r--activerecord/test/cases/relation/where_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/cases/relation/where_test.rb b/activerecord/test/cases/relation/where_test.rb
index 580ea98910..39c8afdd23 100644
--- a/activerecord/test/cases/relation/where_test.rb
+++ b/activerecord/test/cases/relation/where_test.rb
@@ -181,7 +181,9 @@ module ActiveRecord
end
def test_where_with_table_name_and_nested_empty_array
- assert_equal [], Post.where(:id => [[]]).to_a
+ assert_deprecated do
+ assert_equal [], Post.where(:id => [[]]).to_a
+ end
end
def test_where_with_empty_hash_and_no_foreign_key