diff options
author | Thomas Walpole <twalpole@gmail.com> | 2015-07-23 06:49:03 -0700 |
---|---|---|
committer | Thomas Walpole <twalpole@gmail.com> | 2015-11-03 11:34:07 -0800 |
commit | 85f7d955f31209605cccd4cca64be93eec9782f1 (patch) | |
tree | aff4442837d7f5622accfaee0d07d7d6a2a08c1d /activemodel/lib | |
parent | e670611e6002039231a24d547f9a6e053940fb16 (diff) | |
download | rails-85f7d955f31209605cccd4cca64be93eec9782f1.tar.gz rails-85f7d955f31209605cccd4cca64be93eec9782f1.tar.bz2 rails-85f7d955f31209605cccd4cca64be93eec9782f1.zip |
Update and fix forbidden attributes tests
Add AC::Parameters tests for WhereChain#not
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/attribute_assignment.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/attribute_assignment.rb b/activemodel/lib/active_model/attribute_assignment.rb index 087d11f708..62014cd1cd 100644 --- a/activemodel/lib/active_model/attribute_assignment.rb +++ b/activemodel/lib/active_model/attribute_assignment.rb @@ -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.blank? + return if new_attributes.nil? || new_attributes.empty? attributes = new_attributes.stringify_keys _assign_attributes(sanitize_for_mass_assignment(attributes)) |