From 5b86c3e5bb2bb54003d8f211b46a7b992355dbf5 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Fri, 22 Oct 2010 10:28:53 +0200 Subject: has_one maintains the association with separate after_create/after_update This way parent models can get their own after_create and after_update callbacks fired after has_one has done its job. --- activerecord/test/schema/schema.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'activerecord/test/schema') diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb index ea62833d81..fe59d8aeec 100644 --- a/activerecord/test/schema/schema.rb +++ b/activerecord/test/schema/schema.rb @@ -156,6 +156,11 @@ ActiveRecord::Schema.define do t.integer :company_id end + create_table :iris, :force => true do |t| + t.integer :eye + t.string :color + end + create_table :customers, :force => true do |t| t.string :name t.integer :balance, :default => 0 @@ -194,6 +199,9 @@ ActiveRecord::Schema.define do t.integer :car_id end + create_table :eyes, :force => true do |t| + end + create_table :tyres, :force => true do |t| t.integer :car_id end -- cgit v1.2.3