diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-12-29 14:26:38 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-12-29 14:27:33 +0000 |
commit | c99d507fccca2e9e4d12e49b4387e007c5481ae9 (patch) | |
tree | 269b10745091c0c0e3941ab756cec0130cbc11bd /activerecord/test/cases/associations/join_model_test.rb | |
parent | 0b8b68209ded58e40cc18f3fef2f2c38e3730bb8 (diff) | |
download | rails-c99d507fccca2e9e4d12e49b4387e007c5481ae9.tar.gz rails-c99d507fccca2e9e4d12e49b4387e007c5481ae9.tar.bz2 rails-c99d507fccca2e9e4d12e49b4387e007c5481ae9.zip |
Deprecate implicit eager loading. Closes #950.
Diffstat (limited to 'activerecord/test/cases/associations/join_model_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/join_model_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations/join_model_test.rb b/activerecord/test/cases/associations/join_model_test.rb index 995afef796..244d01da7d 100644 --- a/activerecord/test/cases/associations/join_model_test.rb +++ b/activerecord/test/cases/associations/join_model_test.rb @@ -362,7 +362,7 @@ class AssociationsJoinModelTest < ActiveRecord::TestCase end assert_raise ActiveRecord::EagerLoadPolymorphicError do - tags(:general).taggings.find(:all, :include => :taggable, :conditions => 'bogus_table.column = 1') + tags(:general).taggings.eager_load(:taggable).where('bogus_table.column = 1').to_a end end @@ -419,7 +419,7 @@ class AssociationsJoinModelTest < ActiveRecord::TestCase end def test_eager_load_has_many_through_has_many - author = Author.find :first, :conditions => ['name = ?', 'David'], :include => :comments, :order => 'comments.id' + author = Author.where('name = ?', 'David').eager_load(:comments).order('comments.id').first SpecialComment.new; VerySpecialComment.new assert_no_queries do assert_equal [1,2,3,5,6,7,8,9,10,12], author.comments.collect(&:id) |