提交 d30f0011 编写于 作者: J Jurnell Cockhren

removed erroneous line. Corrected presence validation example.

Addresses #20343.
Removes erroneous line of code in the sample codeblock.
上级 09205766
......@@ -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:
```ruby
validates :boolean_field_name, presence: true
validates :boolean_field_name, inclusion: { in: [true, false] }
validates :boolean_field_name, exclusion: { in: [nil] }
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册