class Xeroizer::Record::Validator::PresenceOfValidator

Public Instance Methods

valid?(record) click to toggle source
# File lib/xeroizer/record/validators/presence_of_validator.rb, line 8
def valid?(record)
  if record[attribute].nil? || record[attribute].to_s == ''
    record.errors << [attribute, options[:message] || "can't be blank"]
  end
end