Permalink
Browse files

Merge pull request #12343 from wangjohn/fix_failing_agile_controller_…

…tests

assign_attributes should return if arguments are blank
  • Loading branch information...
rafaelfranca committed Sep 24, 2013
2 parents 7c2a29e + 3ecf26f commit 1e810024f779d8fb4ac9273e1fc06c5118feec7d
Showing with 1 addition and 0 deletions.
  1. +1 −0 activerecord/lib/active_record/attribute_assignment.rb
@@ -15,6 +15,7 @@ def assign_attributes(new_attributes)
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 = []

0 comments on commit 1e81002

Please sign in to comment.