Agreed, it's all a bit too spooky right now. I started compiling a table of 
different queries and their behaviour (clobber vs. append) between 3.2.12 
and 3.2.14. I'm not totally there yet, but I'll put it up when I think I 
have a good understanding so we can know exactly what tests we need to 
write. Here are two failing ones to start, based on pre-3.2.13 as the 
standard:

diff --git a/activerecord/test/cases/relations_test.rb 
b/activerecord/test/cases/relations_test.rb
index f14eee2..93e0b61 100644--- a/activerecord/test/cases/relations_test.rb+++ 
b/activerecord/test/cases/relations_test.rb
@@ -378,6 +378,10 @@ class RelationTest < ActiveRecord::TestCase
     assert_equal Developer.find_all_by_name('David').map(&:id).sort, developers
   end
+  def test_default_scope_with_conditions_hash_conflict+    assert_equal [], 
DeveloperCalledJamis.where(name: 'David').to_a+  end+
   def test_loading_with_one_association
     posts = Post.preload(:comments)
     post = posts.find { |p| p.id == 1 }
@@ -668,6 +672,11 @@ class RelationTest < ActiveRecord::TestCase
     assert_equal [developers(:poor_jamis)], dev_with_count.to_a
   end
+  def test_relation_merging_with_where_values+    devs = Developer.where(name: 
'David').merge(Developer.where(name: 'Jamis'))+    assert_equal [], devs.to_a+  
end+

Andrew

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to