mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
[ci skip] Add missing blank line to AR validation.
This commit is contained in:
parent
8d7cf75684
commit
22166764cd
1 changed files with 1 additions and 0 deletions
|
@ -533,6 +533,7 @@ validates :boolean_field_name, presence: true
|
|||
validates :boolean_field_name, inclusion: { in: [true, false] }
|
||||
validates :boolean_field_name, exclusion: { in: [nil] }
|
||||
```
|
||||
|
||||
By using one of these validations, you will ensure the value will NOT be `nil`
|
||||
which would result in a `NULL` value in most cases.
|
||||
|
||||
|
|
Loading…
Reference in a new issue