lib/whyvalidationssuckin96/validation_support.rb
# An array of arrays, the first element of each being the validation subclass that will be instantiated
# when validation is performed, the last element being the options the validation will be instantiated
# with.
# @return [Array]
An array of arrays, the first element of each being the validation subclass that will be instantiated
when validation is performed, the last element being the options the validation will be instantiated
with.
An array of arrays the first element of each being the validation subclass that will be instantiated when validation is performed the last element being the options the validation will be instantiated with .
def validation_collection
        @validation_collection ||= begin
          ancestor_with_validations = ancestors[1..-1].detect{|anc| anc.respond_to?(:validation_collection) }
          ancestor_with_validations ? ancestor_with_validations.validation_collection.dup : []
        end
      end
def validation_collection @validation_collection ||= begin ancestor_with_validations = ancestors [ 1 .. - 1 ] . detect { | anc | anc . respond_to? ( :validation_collection ) } ancestor_with_validations ? ancestor_with_validations . validation_collection . dup : [ ] end end
An array of arrays, the first element of each being the validation subclass that will be instantiated
when validation is performed, the last element being the options the validation will be instantiated
with.
An array of arrays the first element of each being the validation subclass that will be instantiated when validation is performed the last element being the options the validation will be instantiated with .
None
Array