diff options
author | Jon Leighton <j@jonathanleighton.com> | 2013-03-15 08:12:09 -0700 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2013-03-15 08:12:09 -0700 |
commit | 5558bb0d65b1bd9ad6aa0bd5a074c21d651248b3 (patch) | |
tree | 1898dace4e88390bcc940f107a48335a38bbf26f /activerecord/test | |
parent | 133a1759a4c317e7836699bba2530603a84d7ccb (diff) | |
parent | 34402c762384336badbce0e2d20dbbe580c88cbe (diff) | |
download | rails-5558bb0d65b1bd9ad6aa0bd5a074c21d651248b3.tar.gz rails-5558bb0d65b1bd9ad6aa0bd5a074c21d651248b3.tar.bz2 rails-5558bb0d65b1bd9ad6aa0bd5a074c21d651248b3.zip |
Merge pull request #9733 from senny/9712_option_to_turn_references_deprecation_off
make it possible to disable implicit join references.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index db81ceeb52..fed1b4a8e8 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -1224,6 +1224,15 @@ class RelationTest < ActiveRecord::TestCase end end + def test_turn_off_eager_loading_with_conditions_on_joins + original_value = ActiveRecord::Base.disable_implicit_join_references + ActiveRecord::Base.disable_implicit_join_references = true + scope = Topic.where(author_email_address: 'my.example@gmail.com').includes(:replies) + assert_not scope.eager_loading? + ensure + ActiveRecord::Base.time_zone_aware_attributes = original_value + end + def test_ordering_with_extra_spaces assert_equal authors(:david), Author.order('id DESC , name DESC').last end |