From a8c1fa4afd4abe6a5c975a164235600d1b8d8b4e Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Tue, 10 May 2011 23:35:01 +0100 Subject: Add test to specify that attributes from an association's conditions should be assigned without mass-assignment protection when a record is built on the association. --- activerecord/test/models/bulb.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/test/models/bulb.rb') diff --git a/activerecord/test/models/bulb.rb b/activerecord/test/models/bulb.rb index c68d008c26..643dcefed3 100644 --- a/activerecord/test/models/bulb.rb +++ b/activerecord/test/models/bulb.rb @@ -2,6 +2,8 @@ class Bulb < ActiveRecord::Base default_scope where(:name => 'defaulty') belongs_to :car + attr_protected :car_id, :frickinawesome + attr_reader :scope_after_initialize after_initialize :record_scope_after_initialize -- cgit v1.2.3