aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-09-24 20:59:05 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-09-24 20:59:05 -0300
commit1e810024f779d8fb4ac9273e1fc06c5118feec7d (patch)
treeb3eda22084417f7e26600bd2356706921af95315
parent7c2a29ec0ba028e39c35f8be393b82059ace5e23 (diff)
parent3ecf26f48ae10b9d11b2db867fa57cf25ee99bed (diff)
downloadrails-1e810024f779d8fb4ac9273e1fc06c5118feec7d.tar.gz
rails-1e810024f779d8fb4ac9273e1fc06c5118feec7d.tar.bz2
rails-1e810024f779d8fb4ac9273e1fc06c5118feec7d.zip
Merge pull request #12343 from wangjohn/fix_failing_agile_controller_tests
assign_attributes should return if arguments are blank
-rw-r--r--activerecord/lib/active_record/attribute_assignment.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/attribute_assignment.rb b/activerecord/lib/active_record/attribute_assignment.rb
index f201f86e22..30fa2c8ba5 100644
--- a/activerecord/lib/active_record/attribute_assignment.rb
+++ b/activerecord/lib/active_record/attribute_assignment.rb
@@ -15,6 +15,7 @@ module ActiveRecord
if !new_attributes.respond_to?(:stringify_keys)
raise ArgumentError, "When assigning attributes, you must pass a hash as an argument."
end
+ return if new_attributes.blank?
attributes = new_attributes.stringify_keys
multi_parameter_attributes = []