From 86d7ed33754f80690395309dd307c6d9ecc0022f Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Sun, 1 May 2011 23:30:07 +0200 Subject: singular and collection relations in AR can now specify mass-assignment security options (:as and :without_protection) in build, create and create! methods. --- .../lib/active_record/associations/has_many_through_association.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/associations/has_many_through_association.rb') diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb index 9d2b29685b..7708228d23 100644 --- a/activerecord/lib/active_record/associations/has_many_through_association.rb +++ b/activerecord/lib/active_record/associations/has_many_through_association.rb @@ -60,10 +60,10 @@ module ActiveRecord through_record end - def build_record(attributes) + def build_record(attributes, options = {}) ensure_not_nested - record = super(attributes) + record = super(attributes, options) inverse = source_reflection.inverse_of if inverse -- cgit v1.2.3