module Sequel::Plugins::ConstraintValidations::ClassMethods

Attributes

constraint_validations[R]

An array of validation method call arrays. Each array is an array that is splatted to send to perform a validation via validation_helpers.

constraint_validations_table[R]

The name of the table containing the constraint validations metadata.

Public Instance Methods

inherited(subclass) click to toggle source

Copy the name of the constraint validations metadata table into the subclass.

# File lib/sequel/plugins/constraint_validations.rb, line 65
def inherited(subclass)
  super
  subclass.instance_variable_set(:@constraint_validations_table, @constraint_validations_table)
end
set_dataset(*) click to toggle source

Parse the constraint validations from the database whenever the dataset changes.

# File lib/sequel/plugins/constraint_validations.rb, line 72
def set_dataset(*)
  r = super
  parse_constraint_validations
  r
end