diff options
author | Arthur Nogueira Neves <github@arthurnn.com> | 2015-09-14 21:18:19 -0400 |
---|---|---|
committer | Arthur Nogueira Neves <github@arthurnn.com> | 2015-09-14 21:18:19 -0400 |
commit | 29886d93048a4719872e228894559b477f87a278 (patch) | |
tree | 7e21d1c254fe06e986fa021a3788e320e65a1a81 | |
parent | 2f0bc1f78975ecaae10f845c7d63928e748dd6a6 (diff) | |
parent | 29acc869db72570822c9774aec3ab6ac4a229890 (diff) | |
download | rails-29886d93048a4719872e228894559b477f87a278.tar.gz rails-29886d93048a4719872e228894559b477f87a278.tar.bz2 rails-29886d93048a4719872e228894559b477f87a278.zip |
Merge pull request #20897 from lukechesser/guide-fix-for-acceptance-validation
Update Validation guide for acceptance method
-rw-r--r-- | guides/source/active_record_validations.md | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md index 15f65a6501..dadac7fb54 100644 --- a/guides/source/active_record_validations.md +++ b/guides/source/active_record_validations.md @@ -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 |