Sha256: 6a831dbdf4ec2ee8b7b31c95ebb7f91c2d0ba5992da56c09ed58001c2a274332
Contents?: true
Size: 442 Bytes
Versions: 13
Compression:
Stored size: 442 Bytes
Contents
# Boolean #### Rules ```ruby # 1. Pattern 'true_values' => [true, 1, '1', 't', 'T', 'true', 'TRUE'] 'false values' => [false, 0, '0', 'f', 'F', 'false', 'FALSE'] ``` #### Options Option | Type | Available | Default --- | --- | --- | --- check | symbol | all, false_only, true_only | all #### Usage ```ruby class User < ActiveRecord::Base validates :input0, boolean: true validates :input1, boolean: { check: :true_only } end ```
Version data entries
13 entries across 13 versions & 1 rubygems