Class: PaidUp::Validators::RolifyRows
- Inherits:
-
ActiveModel::Validator
- Object
- ActiveModel::Validator
- PaidUp::Validators::RolifyRows
- Defined in:
- lib/paid_up/validators/rolify_rows.rb
Instance Method Summary collapse
Instance Method Details
#validate(record) ⇒ Object
3 4 5 6 7 |
# File 'lib/paid_up/validators/rolify_rows.rb', line 3 def validate(record) if record.send([:field]) == [:comparison] && !ActiveRecord::Base.connection.table_exists?(record.send([:found_in])) record.errors[[:found_in]] << :when_using_rolify_rows_table_must_exist.l end end |