aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorAngelo capilleri <capilleri@yahoo.com>2013-03-13 14:18:37 +0100
committerAngelo capilleri <capilleri@yahoo.com>2013-03-13 14:18:37 +0100
commit74c3b7f6f61c1115b7409cb8ce9d6832ef9caa75 (patch)
treee6d8da835f24d387619c8a605589756cfdca624f /guides/source
parent8b3483f0a8144d0093108acc28d50814076dcf73 (diff)
downloadrails-74c3b7f6f61c1115b7409cb8ce9d6832ef9caa75.tar.gz
rails-74c3b7f6f61c1115b7409cb8ce9d6832ef9caa75.tar.bz2
rails-74c3b7f6f61c1115b7409cb8ce9d6832ef9caa75.zip
fix absence validator doc for boolean field
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/active_record_validations.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md
index 7dbe464f34..df39d3c5dc 100644
--- a/guides/source/active_record_validations.md
+++ b/guides/source/active_record_validations.md
@@ -566,8 +566,8 @@ If you validate the absence of an object associated via a `has_one` or
`has_many` relationship, it will check that the object is neither `present?` nor
`marked_for_destruction?`.
-Since `false.present?` is false, if you want to validate the presence of a boolean
-field you should use `validates :field_name, inclusion: { in: [true, false] }`.
+Since `false.present?` is false, if you want to validate the absence of a boolean
+field you should use `validates :field_name, exclusion: { in: [true, false] }`.
The default error message is _"must be blank"_.