mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
commit
6f3678ce36
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ module ActiveModel
|
|||
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.nil? || new_attributes.empty?
|
||||
return if new_attributes.empty?
|
||||
|
||||
attributes = new_attributes.stringify_keys
|
||||
_assign_attributes(sanitize_for_mass_assignment(attributes))
|
||||
|
|
Loading…
Reference in a new issue