module DefraRuby::Validators::CanValidatePresence
Private Instance Methods
value_is_present?(record, attribute, value)
click to toggle source
# File lib/defra_ruby/validators/concerns/can_validate_presence.rb, line 9 def value_is_present?(record, attribute, value) return true if value.present? add_validation_error(record, attribute, :blank) false end