Class: Axn::Validation::Fields::GateFlipValidator
- Inherits:
-
ActiveModel::Validator
- Object
- ActiveModel::Validator
- Axn::Validation::Fields::GateFlipValidator
- Defined in:
- lib/axn/core/validation/fields.rb
Overview
The custom validator the gate probe declares: it flips the flag and reads NO attribute (so it
never resolves a model, trips the method_call gate, or touches the source), isolating the pure
gate decision. A plain ActiveModel::Validator (NOT an EachValidator) so AM invokes validate
once per record with no per-attribute read. Reachable from the probe subclass via const_get
ancestor lookup, exactly like Base's other one-off validator constants.
Instance Method Summary collapse
Instance Method Details
#validate(record) ⇒ Object
156 |
# File 'lib/axn/core/validation/fields.rb', line 156 def validate(record) = record.__axn_flip_gate! |