aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2012-09-02 17:19:50 +0200
committerYves Senn <yves.senn@garaio.com>2012-09-03 16:35:38 +0200
commit01d09a6079b0af387c722ba2148cf7af308d3f49 (patch)
treebee01cb37bfa634b2348d5ede8e8e68d43d6876e /activerecord/test/schema
parentcabab374bfc6c1bd1d783ecc3c674047f17523c6 (diff)
downloadrails-01d09a6079b0af387c722ba2148cf7af308d3f49.tar.gz
rails-01d09a6079b0af387c722ba2148cf7af308d3f49.tar.bz2
rails-01d09a6079b0af387c722ba2148cf7af308d3f49.zip
set the configured #inheritance_column on #become (#7503)
I had to create a new table because I needed an STI table, which does not have both a "type" and a "custom_type" the test fails with: 1) Error: test_alt_becomes_works_with_sti(InheritanceTest): NoMethodError: undefined method `type=' for #<Cabbage id: 1, name: "my cucumber", custom_type: "Cucumber"> /Users/username/Projects/rails/activemodel/lib/active_model/attribute_methods.rb:432:in `method_missing' /Users/username/Projects/rails/activerecord/lib/active_record/attribute_methods.rb:100:in `method_missing' /Users/username/Projects/rails/activerecord/lib/active_record/persistence.rb:165:in `becomes' test/cases/inheritance_test.rb:134:in `test_becomes_works_with_sti' test/cases/inheritance_test.rb:140:in `test_alt_becomes_works_with_sti' Conflicts: activerecord/test/cases/inheritance_test.rb
Diffstat (limited to 'activerecord/test/schema')
-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 b3ae2abbc4..b8150c50b9 100644
--- a/activerecord/test/schema/schema.rb
+++ b/activerecord/test/schema/schema.rb
@@ -179,6 +179,11 @@ ActiveRecord::Schema.define do
add_index :companies, [:firm_id, :type, :rating, :ruby_type], :name => "company_index"
+ create_table :vegetables, :force => true do |t|
+ t.string :name
+ t.string :custom_type
+ end
+
create_table :computers, :force => true do |t|
t.integer :developer, :null => false
t.integer :extendedWarranty, :null => false