Skip to content

Commit

Permalink
Remove deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
vsppedro committed May 14, 2021
1 parent 80f6a92 commit 2f51a3e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/shoulda/matchers/active_model/validator.rb
Expand Up @@ -98,12 +98,7 @@ def perform_validation

all_validation_errors = record.errors.dup

validation_error_messages =
if record.errors.respond_to?(:[])
record.errors[attribute]
else
record.errors.on(attribute)
end
validation_error_messages = record.errors[attribute]

{
all_validation_errors: all_validation_errors,
Expand Down

0 comments on commit 2f51a3e

Please sign in to comment.