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

Active Model: Improve CHANGELOG and documentation for validates_acceptance_of [ci skip] #24799

Merged
merged 1 commit into from
May 5, 2016

Conversation

prathamesh-sonpatki
Copy link
Member

Summary

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
Copy link
Member

Choose a reason for hiding this comment

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

Previously, only

Copy link
Member Author

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?

Copy link
Member

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.

@prathamesh-sonpatki
Copy link
Member Author

r? @jeremy

@jeremy jeremy assigned vipulnsward and unassigned jeremy May 3, 2016
```

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
Copy link
Member

Choose a reason for hiding this comment

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

considered as accepted

Copy link
Member Author

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`.
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

4 participants