diff options
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/bulb.rb | 7 | ||||
-rw-r--r-- | activerecord/test/models/car.rb | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/models/bulb.rb b/activerecord/test/models/bulb.rb new file mode 100644 index 0000000000..9eefc5803a --- /dev/null +++ b/activerecord/test/models/bulb.rb @@ -0,0 +1,7 @@ +class Bulb < ActiveRecord::Base + + default_scope :conditions => {:name => 'defaulty' } + + belongs_to :car + +end diff --git a/activerecord/test/models/car.rb b/activerecord/test/models/car.rb index faf4e6cbc0..903ec53288 100644 --- a/activerecord/test/models/car.rb +++ b/activerecord/test/models/car.rb @@ -1,4 +1,5 @@ class Car < ActiveRecord::Base + has_many :bulbs has_many :tyres has_many :engines has_many :wheels, :as => :wheelable |