aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema/schema.rb
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2014-01-14 07:05:54 -0800
committerAndrew White <andyw@pixeltrix.co.uk>2014-01-14 07:05:54 -0800
commit8a60f479b0580e88bae77c0ab3dd9e95082cb437 (patch)
treecc13fee530ff0a6045b8a4acb58e9a96e4b818cc /activerecord/test/schema/schema.rb
parentb242b2dbe75f0b5e86e2ce9ef7c2c5ee96e17862 (diff)
parente8d1d84837a59ef7d73b29b16ee05cd610d30a90 (diff)
downloadrails-8a60f479b0580e88bae77c0ab3dd9e95082cb437.tar.gz
rails-8a60f479b0580e88bae77c0ab3dd9e95082cb437.tar.bz2
rails-8a60f479b0580e88bae77c0ab3dd9e95082cb437.zip
Merge pull request #13710 from ujjwalt/hotfix/sti
Active Record's subclass_from_attributes shouldn't assume :type is for STI unless there is a type column.
Diffstat (limited to 'activerecord/test/schema/schema.rb')
-rw-r--r--activerecord/test/schema/schema.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb
index ddfc1ac0d6..9a7d918a25 100644
--- a/activerecord/test/schema/schema.rb
+++ b/activerecord/test/schema/schema.rb
@@ -557,9 +557,14 @@ ActiveRecord::Schema.define do
create_table :products, force: true do |t|
t.references :collection
+ t.references :type
t.string :name
end
+ create_table :product_types, force: true do |t|
+ t.string :name
+ end
+
create_table :projects, force: true do |t|
t.string :name
t.string :type