module Sequel::Plugins::ConstraintValidations::ClassMethods

  1. lib/sequel/plugins/constraint_validations.rb


constraint_validation_reflections [R]

A hash of reflections of constraint validations. Keys are type name symbols. Each value is an array of pairs, with the first element being the validation type symbol (e.g. :presence) and the second element being options for the validation. If the validation takes an argument, it appears as the :argument entry in the validation option hash.

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


Freeze constraint validations data when freezing model class.

[show source]
    # File lib/sequel/plugins/constraint_validations.rb
 94 def freeze
 95   @constraint_validations.freeze.each(&:freeze)
 96   @constraint_validation_reflections.freeze.each_value do |v|
 97     v.freeze
 98     v.each(&:freeze)
 99   end
100   @constraint_validation_options.freeze.each_value(&:freeze)
102   super
103 end