-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Active Model: Improve CHANGELOG and documentation for validates_acceptance_of
[ci skip]
#24799
Conversation
In the past, only "1" was the default and you were required to add | ||
accept: true. | ||
The default for `validates_acceptance_of` is now `"1"` and `true`. | ||
In the past, only `"1"` was the default and you were required to pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Vipul, Any specific reasons for Previously
over In the past
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the past
implies a change that existed some time ago, and not just the one we are just changing.
I think it's used only at one place(change) that's just below in the changelog. Everywhere else we use previously
.
b8135df
to
94e0921
Compare
r? @jeremy |
``` | ||
|
||
It can also receive an `:accept` option, which determines the allowed values | ||
that will be considered accepted. It defaults to `['1', true]` and can be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
considered as accepted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
…ptance_of` [ci skip] - Improve CHANGELOG entry for rails#18439. - The documentation is updated as per changes in PR rails#18439 to the `accept` option. - The explanation about the virtual attribute is moved at the end so that the arity of `accept` option is explained first. - Added a note that `message` can also be passed to `validates_acceptance_of`.
94e0921
to
f7d7147
Compare
Summary
accept
option.that the arity of
accept
option is explained first.message
can also be passed tovalidates_acceptance_of
.