提交 29886d93 编写于 作者: A Arthur Nogueira Neves

Merge pull request #20897 from lukechesser/guide-fix-for-acceptance-validation

Update Validation guide for acceptance method
......@@ -273,9 +273,13 @@ available helpers.
This method validates that a checkbox on the user interface was checked when a
form was submitted. This is typically used when the user needs to agree to your
application's terms of service, confirm that some text is read, or any similar
concept. This validation is very specific to web applications and this
'acceptance' does not need to be recorded anywhere in your database (if you
don't have a field for it, the helper will just create a virtual attribute).
concept.
This validation is very specific to web applications and this
'acceptance' does not need to be recorded anywhere in your database. If you
don't have a field for it, the helper will just create a virtual attribute. If
the field does exist in your database, the `accept` option must be set to
`true` or else the validation will not run.
```ruby
class Person < ActiveRecord::Base
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册