aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-10-22 10:28:53 +0200
committerXavier Noria <fxn@hashref.com>2010-10-22 10:28:53 +0200
commit5b86c3e5bb2bb54003d8f211b46a7b992355dbf5 (patch)
tree1375ec5b4b1bfc68b8255b82980aa6bb45b6da3b /activerecord/test/schema
parentfc8c0729881fff59e916f7ab180dbfa03ee1b891 (diff)
downloadrails-5b86c3e5bb2bb54003d8f211b46a7b992355dbf5.tar.gz
rails-5b86c3e5bb2bb54003d8f211b46a7b992355dbf5.tar.bz2
rails-5b86c3e5bb2bb54003d8f211b46a7b992355dbf5.zip
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.
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r--activerecord/test/schema/schema.rb8
1 files changed, 8 insertions, 0 deletions
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