diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-11 15:47:36 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-11 15:48:11 -0300 |
commit | c8a70660d46343d05c954c8a9b830166aa7335e9 (patch) | |
tree | a1910daaec4c5be938d71d16ccf508bab5bd8813 /activerecord/test/cases/associations | |
parent | 7bb8fd2f641c3416522e647ed32a3142ccc1e01b (diff) | |
parent | 8d11fbf679e17c277ddf5bf52311f0e824ebae46 (diff) | |
download | rails-c8a70660d46343d05c954c8a9b830166aa7335e9.tar.gz rails-c8a70660d46343d05c954c8a9b830166aa7335e9.tar.bz2 rails-c8a70660d46343d05c954c8a9b830166aa7335e9.zip |
Merge branch 'rm-fix-13648'
Includes https://github.com/rails/rails/pull/14711 and some cleanup
commits.
Fixes #13648
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r-- | activerecord/test/cases/associations/eager_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb index 8c9797861c..7eaa5adc86 100644 --- a/activerecord/test/cases/associations/eager_test.rb +++ b/activerecord/test/cases/associations/eager_test.rb @@ -1198,6 +1198,14 @@ class EagerAssociationTest < ActiveRecord::TestCase assert_equal authors(:bob), author end + test "preloading with a polymorphic association and using the existential predicate but also using a select" do + assert_equal authors(:david), authors(:david).essays.includes(:writer).first.writer + + assert_nothing_raised do + authors(:david).essays.includes(:writer).select(:name).any? + end + end + test "preloading with a polymorphic association and using the existential predicate" do assert_equal authors(:david), authors(:david).essays.includes(:writer).first.writer |