diff options
Diffstat (limited to 'activerecord/lib/active_record/associations/association_collection.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/association_collection.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index 80b7658a95..d3b76e2087 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -86,14 +86,14 @@ module ActiveRecord end def create(attrs = {}) - record = @reflection.klass.with_scope(construct_scope) { @reflection.klass.create(attrs) } + record = @reflection.klass.with_scope(:create => construct_scope[:create]) { @reflection.klass.create(attrs) } @target ||= [] unless loaded? @target << record record end def create!(attrs = {}) - record = @reflection.klass.with_scope(construct_scope) { @reflection.klass.create!(attrs) } + record = @reflection.klass.with_scope(:create => construct_scope[:create]) { @reflection.klass.create!(attrs) } @target ||= [] unless loaded? @target << record record |