1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

removed erroneous line. Corrected presence validation example.

Addresses #20343.
Removes erroneous line of code in the sample codeblock.
This commit is contained in:
Jurnell Cockhren 2015-05-28 15:03:37 -05:00
parent 0920576610
commit d30f0011a9

View file

@ -552,7 +552,6 @@ Since `false.blank?` is true, if you want to validate the presence of a boolean
field you should use one of the following validations: field you should use one of the following validations:
```ruby ```ruby
validates :boolean_field_name, presence: true
validates :boolean_field_name, inclusion: { in: [true, false] } validates :boolean_field_name, inclusion: { in: [true, false] }
validates :boolean_field_name, exclusion: { in: [nil] } validates :boolean_field_name, exclusion: { in: [nil] }
``` ```