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

Fix: ActiveModel::Errors#added? doesn't work for the errors with 'options' hash containing 'value' key #36961

Closed
wants to merge 2 commits into from

Conversation

vishaltelangre
Copy link
Contributor

Summary

Currently, the ActiveModel::Errors#added? method relies on ActiveModel::Error#strict_match? which strictly matches against the value option.

This PR ignores the value option in ActiveModel::Error#strict_match? while comparing the provided options hash with the own options hash which contains the value option.

Fixes: #36573

@vishaltelangre
Copy link
Contributor Author

This PR is ready for review.

@rails-bot
Copy link

rails-bot bot commented Dec 17, 2019

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.

@rails-bot rails-bot bot added the stale label Dec 17, 2019
@rails-bot rails-bot bot closed this Dec 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

errors.added? for :id seems to be broken
1 participant