Sha256: 10393cfdcf15c3d0990e63c745d9c8a97a94ad011318ef3e3c8e20b80e83887b
Contents?: true
Size: 351 Bytes
Versions: 43
Compression:
Stored size: 351 Bytes
Contents
module PaidUp::Validators 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
Version data entries
43 entries across 43 versions & 1 rubygems