Sha256: 33e5b439212ac1fbe4239f5e97f758625e36b770002b95d49ebd6c200c776a0f
Contents?: true
Size: 252 Bytes
Versions: 1
Compression:
Stored size: 252 Bytes
Contents
class BillingAddressValidator < ActiveModel::Validator def validate(record) address = record.try(:billing_address) record.errors[:billing_address] << "valid billing address is required" unless (address.present? and address.valid?) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
effective_addresses-0.1 | app/models/validators/billing_address_validator.rb |