aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/has_many_through_association.rb
diff options
context:
space:
mode:
authorJosh Kalderimis <josh.kalderimis@gmail.com>2011-05-01 23:30:07 +0200
committerJosh Kalderimis <josh.kalderimis@gmail.com>2011-05-01 23:30:07 +0200
commit86d7ed33754f80690395309dd307c6d9ecc0022f (patch)
treed944866c714bb8ec7f8ebf0536767418a6437212 /activerecord/lib/active_record/associations/has_many_through_association.rb
parent7c5ae0a88fc9406857ee362c827c57eb23fd5f95 (diff)
downloadrails-86d7ed33754f80690395309dd307c6d9ecc0022f.tar.gz
rails-86d7ed33754f80690395309dd307c6d9ecc0022f.tar.bz2
rails-86d7ed33754f80690395309dd307c6d9ecc0022f.zip
singular and collection relations in AR can now specify mass-assignment security options (:as and :without_protection) in build, create and create! methods.
Diffstat (limited to 'activerecord/lib/active_record/associations/has_many_through_association.rb')
-rw-r--r--activerecord/lib/active_record/associations/has_many_through_association.rb4
1 files changed, 2 insertions, 2 deletions
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