aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/family_tree.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-01-29 05:43:45 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-02-01 06:27:23 +0900
commit111ccc832bc977b15af12c14e7ca078dad2d4373 (patch)
tree640fa3c6f1b6d2553f689399e57873ef11a06bed /activerecord/test/models/family_tree.rb
parenta57b5292b0987c62d8567b253c9b54dc84b560d6 (diff)
downloadrails-111ccc832bc977b15af12c14e7ca078dad2d4373.tar.gz
rails-111ccc832bc977b15af12c14e7ca078dad2d4373.tar.bz2
rails-111ccc832bc977b15af12c14e7ca078dad2d4373.zip
Chain scope constraints should respect own table alias
Fixes #27666.
Diffstat (limited to 'activerecord/test/models/family_tree.rb')
-rw-r--r--activerecord/test/models/family_tree.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/models/family_tree.rb b/activerecord/test/models/family_tree.rb
new file mode 100644
index 0000000000..cd9829fedd
--- /dev/null
+++ b/activerecord/test/models/family_tree.rb
@@ -0,0 +1,4 @@
+class FamilyTree < ActiveRecord::Base
+ belongs_to :member, class_name: "User", foreign_key: "member_id"
+ belongs_to :family
+end