Module: ActiveModel::Validations::HelperMethods

Defined in:
lib/validates_truthiness/validates_verity.rb,
lib/validates_truthiness/validates_falsity.rb,
lib/validates_truthiness/validates_truthiness.rb

Instance Method Summary collapse

Instance Method Details

#validates_falsity_of(*attr_names) ⇒ Object Also known as: validates_falsehood_of



10
11
12
# File 'lib/validates_truthiness/validates_falsity.rb', line 10

def validates_falsity_of(*attr_names)
  validates_with FalsityValidator, _merge_attributes(attr_names)
end

#validates_truthiness_of(*attr_names) ⇒ Object Also known as: validates_booleanship_of



10
11
12
# File 'lib/validates_truthiness/validates_truthiness.rb', line 10

def validates_truthiness_of(*attr_names)
  validates_with TruthinessValidator, _merge_attributes(attr_names)
end

#validates_verity_of(*attr_names) ⇒ Object Also known as: validates_truth_of



10
11
12
# File 'lib/validates_truthiness/validates_verity.rb', line 10

def validates_verity_of(*attr_names)
  validates_with VerityValidator, _merge_attributes(attr_names)
end