Sha256: 231af83d1bf1a1bbc5111024c4d7594e6a8b8214fb4cc164e38ddd9171dc63ca
Contents?: true
Size: 344 Bytes
Versions: 14
Compression:
Stored size: 344 Bytes
Contents
module PaidUp class TableValidator < ActiveModel::Validator def validate(record) if record.send(options[:field]) == options[:comparison] && !ActiveRecord::Base.connection.table_exists?(record.send(options[:found_in])) record.errors[options[:found_in]] << :when_using_table_rows_table_must_exist.l end end end end
Version data entries
14 entries across 14 versions & 1 rubygems