Sha256: 18c5570c7df4f6fecc1790d36c3bae23dfa36f481e193cf97788d363cc542465
Contents?: true
Size: 353 Bytes
Versions: 43
Compression:
Stored size: 353 Bytes
Contents
module PaidUp::Validators class RolifyRows < 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_rolify_rows_table_must_exist.l end end end end
Version data entries
43 entries across 43 versions & 1 rubygems