diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2019-07-15 20:36:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-15 20:36:40 +0100 |
commit | bec7be880064c7b50ab9500c3b4fdb4296a8cd4a (patch) | |
tree | ea55928d7cab96572cc731cf3b494612944a764c /activemodel/lib | |
parent | 69cb9eb7adaf2ee1c33ee1dcf6aadd6eafa7b6d2 (diff) | |
parent | 06756290d5000034e6815f57d5003111ff0b2865 (diff) | |
download | rails-bec7be880064c7b50ab9500c3b4fdb4296a8cd4a.tar.gz rails-bec7be880064c7b50ab9500c3b4fdb4296a8cd4a.tar.bz2 rails-bec7be880064c7b50ab9500c3b4fdb4296a8cd4a.zip |
Merge pull request #36649 from Edouard-chin/ec-errors-strit-match-collection
Fix `AM::Errors.added?` trying to generate a message:
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/error.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/error.rb b/activemodel/lib/active_model/error.rb index 5141bc6789..ea141fe107 100644 --- a/activemodel/lib/active_model/error.rb +++ b/activemodel/lib/active_model/error.rb @@ -58,9 +58,9 @@ module ActiveModel end def strict_match?(attribute, type, **options) - return false unless match?(attribute, type, **options) + return false unless match?(attribute, type) - full_message == Error.new(@base, attribute, type, **options).full_message + options == @options.except(*CALLBACKS_OPTIONS + MESSAGE_OPTIONS) end def ==(other) |