diff options
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 7ba5beb12b..dc3dc2afa6 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -444,9 +444,10 @@ module ActiveRecord #:nodoc: if attributes.is_a?(Array) attributes.collect { |attr| create(attr) } else - attributes.reverse_merge!(scope(:create)) if scoped?(:create) - object = new(attributes) + if scoped?(:create) + scope(:create).each { |att,value| object.send("#{att}=", value) } + end object.save object end |