From 111ccc832bc977b15af12c14e7ca078dad2d4373 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 29 Jan 2017 05:43:45 +0900 Subject: Chain scope constraints should respect own table alias Fixes #27666. --- activerecord/test/schema/schema.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'activerecord/test/schema') diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb index b38b9661b3..4c31548fff 100644 --- a/activerecord/test/schema/schema.rb +++ b/activerecord/test/schema/schema.rb @@ -329,6 +329,15 @@ ActiveRecord::Schema.define do create_table :eyes, force: true do |t| end + create_table :families, force: true do |t| + end + + create_table :family_trees, force: true do |t| + t.references :family + t.references :member + t.string :token + end + create_table :funny_jokes, force: true do |t| t.string :name end -- cgit v1.2.3