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

Add docs for Active Record validation with multiple contexts #47850

Merged

Conversation

notapatch
Copy link
Contributor

Detail

The PR documents this change

Allowing multiple contexts to be validated:
person.valid?([:create, :update]) # => true

The change isn't visible in the API documentation which this PR
fixes.

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

activerecord/lib/active_record/validations.rb Outdated Show resolved Hide resolved
@notapatch notapatch force-pushed the api-docs-activerecord-validate-multiple-contexts branch from d330bf2 to 5cb0373 Compare April 3, 2023 15:24
@notapatch notapatch requested a review from p8 April 3, 2023 15:34
The PR documents this change:
  rails#21535
Which allows multiple contexts to be validated:
  person.valid?([:create, :update])    # => true

The change isn't visible in the API documentation which this PR
fixes.
@notapatch notapatch force-pushed the api-docs-activerecord-validate-multiple-contexts branch from 5cb0373 to 5b25375 Compare April 6, 2023 15:13
@notapatch notapatch requested a review from zzak April 6, 2023 15:36
Copy link
Member

@zzak zzak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@zzak zzak merged commit 97f0c3c into rails:main Apr 8, 2023
8 checks passed
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.

None yet

3 participants