class Veto::NotNullCheck
Public Instance Methods
check(attribute, value, errors, options={})
click to toggle source
# File lib/veto/checks/not_null_check.rb, line 3 def check(attribute, value, errors, options={}) message = options.fetch(:message, :not_null) on = options.fetch(:on, attribute) if value.nil? errors.add(on, message) end end