Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renew deprecated methods #1444

Merged
merged 2 commits into from Jun 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/shoulda/matchers/active_model/helpers.rb
Expand Up @@ -8,7 +8,7 @@ def pretty_error_messages(object)
end

def format_validation_errors(errors)
list_items = errors.keys.map do |attribute|
list_items = errors.to_hash.keys.map do |attribute|
messages = errors[attribute]
"* #{attribute}: #{messages}"
end
Expand Down
Expand Up @@ -73,7 +73,7 @@ def record_with_custom_validation

def custom_validation # rubocop:disable Lint/NestedMethodDefinition
if self[:attr] != 'good value'
errors[:attr2] << 'some message'
errors.add :attr2, 'some message'
end
end
end.new
Expand Down