diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2019-07-15 20:41:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-15 20:41:16 +0100 |
commit | 43c27e479a3a8a59064fd7bdb98909ff81a8b3bf (patch) | |
tree | 67f909af97e8a13d8a75635d10ca5e000627633d /activemodel/lib | |
parent | bec7be880064c7b50ab9500c3b4fdb4296a8cd4a (diff) | |
parent | 4a8cf101485469194f56ff666b262bd8bb2a538e (diff) | |
download | rails-43c27e479a3a8a59064fd7bdb98909ff81a8b3bf.tar.gz rails-43c27e479a3a8a59064fd7bdb98909ff81a8b3bf.tar.bz2 rails-43c27e479a3a8a59064fd7bdb98909ff81a8b3bf.zip |
Merge pull request #36654 from Edouard-chin/ec-errors-delete
Returns `nil` when `AM::Errors#delete` doesn't delete anything:
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/errors.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb index 3de999308b..e9f92dba82 100644 --- a/activemodel/lib/active_model/errors.rb +++ b/activemodel/lib/active_model/errors.rb @@ -198,7 +198,7 @@ module ActiveModel matches.each do |error| @errors.delete(error) end - matches.map(&:message) + matches.map(&:message).presence end # When passed a symbol or a name of a method, returns an array of errors |