1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/models/bulb.rb
Neeraj Singh 2e45542942 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>
2010-08-19 14:52:15 -03:00

7 lines
115 B
Ruby

class Bulb < ActiveRecord::Base
default_scope :conditions => {:name => 'defaulty' }
belongs_to :car
end