diff options
author | Lauro Caetano <laurocaetano1@gmail.com> | 2014-06-02 23:07:02 -0300 |
---|---|---|
committer | Lauro Caetano <laurocaetano1@gmail.com> | 2014-06-03 16:20:08 -0300 |
commit | 2c555ec43ad254ab63cf1e572f999f7521c6cb04 (patch) | |
tree | a4bb9b3cd4364005ec0f802baae1b93273fc5f64 /activerecord/test/cases/associations/eager_test.rb | |
parent | 4bcf9029452e0c760af04faab6b549710401e8cf (diff) | |
download | rails-2c555ec43ad254ab63cf1e572f999f7521c6cb04.tar.gz rails-2c555ec43ad254ab63cf1e572f999f7521c6cb04.tar.bz2 rails-2c555ec43ad254ab63cf1e572f999f7521c6cb04.zip |
Fix regression on eager loading association based on SQL query rather
than existing column.
Fixes #15480.
Diffstat (limited to 'activerecord/test/cases/associations/eager_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/eager_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb index 4bd4486b41..910067666a 100644 --- a/activerecord/test/cases/associations/eager_test.rb +++ b/activerecord/test/cases/associations/eager_test.rb @@ -1239,6 +1239,10 @@ class EagerAssociationTest < ActiveRecord::TestCase } end + test "including association based on sql condition and no database column" do + assert_equal pets(:parrot), Owner.including_last_pet.first.last_pet + end + test "include instance dependent associations is deprecated" do message = "association scope 'posts_with_signature' is" assert_deprecated message do |