aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema/schema.rb
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2010-08-12 21:37:48 -0400
committerJosé Valim <jose.valim@gmail.com>2010-08-19 14:52:15 -0300
commit2e455429427a4078d2888cc39305f951bdf1e643 (patch)
treeb67aa66e66704aca116fd90f72144528aab563b4 /activerecord/test/schema/schema.rb
parent43f44c1a034497fef0a9ed64e0da6f090b5c3b7e (diff)
downloadrails-2e455429427a4078d2888cc39305f951bdf1e643.tar.gz
rails-2e455429427a4078d2888cc39305f951bdf1e643.tar.bz2
rails-2e455429427a4078d2888cc39305f951bdf1e643.zip
While creating a new record using has_many create method default scope of child should be respected.
author.posts.create should take into account default_scope defined on post. [#3939: state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
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 8017e13920..7657e00800 100644
--- a/activerecord/test/schema/schema.rb
+++ b/activerecord/test/schema/schema.rb
@@ -198,6 +198,11 @@ ActiveRecord::Schema.define do
t.integer :car_id
end
+ create_table :bulbs, :force => true do |t|
+ t.integer :car_id
+ t.string :name
+ end
+
create_table :entrants, :force => true do |t|
t.string :name, :null => false
t.integer :course_id, :null => false