diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2011-05-01 16:59:33 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2011-05-01 16:59:33 -0700 |
commit | a8861c8f5b57ea653e1518325a686fd97995aef4 (patch) | |
tree | a0d348d1b99ec15c6601d6f47a5a84365e06e93d /activerecord/lib/active_record/associations/has_many_through_association.rb | |
parent | 32ef3ccaa6beae4ef73969f51d5159f4cc4d9ff7 (diff) | |
parent | 86d7ed33754f80690395309dd307c6d9ecc0022f (diff) | |
download | rails-a8861c8f5b57ea653e1518325a686fd97995aef4.tar.gz rails-a8861c8f5b57ea653e1518325a686fd97995aef4.tar.bz2 rails-a8861c8f5b57ea653e1518325a686fd97995aef4.zip |
Merge pull request #357 from joshk/assign_attributes.
Assign protected attributes with create/new and control the role.
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.rb | 4 |
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 |