Sha256: 8b01f40f9140aae6fcd470054cc20787fa2e7fab5e19ccc467684dc90f896a90
Contents?: true
Size: 468 Bytes
Versions: 16
Compression:
Stored size: 468 Bytes
Contents
module PaidUp module Validators # Table Rows validator class TableRows < 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 end
Version data entries
16 entries across 16 versions & 1 rubygems