From 6e466f17c3d0d06cc364c27fd844a66fb4a89aa2 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Thu, 12 May 2011 23:29:07 +0100 Subject: Don't use mass-assignment protection when setting foreign keys or association conditions on singular associations. Fixes #481 (again). --- activerecord/test/models/car.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'activerecord/test/models') diff --git a/activerecord/test/models/car.rb b/activerecord/test/models/car.rb index de1864345a..76f20b1061 100644 --- a/activerecord/test/models/car.rb +++ b/activerecord/test/models/car.rb @@ -4,6 +4,9 @@ class Car < ActiveRecord::Base has_many :foo_bulbs, :class_name => "Bulb", :conditions => { :name => 'foo' } has_many :frickinawesome_bulbs, :class_name => "Bulb", :conditions => { :frickinawesome => true } + has_one :bulb + has_one :frickinawesome_bulb, :class_name => "Bulb", :conditions => { :frickinawesome => true } + has_many :tyres has_many :engines has_many :wheels, :as => :wheelable -- cgit v1.2.3