Sha256: 1024718fdf6b0fe7220859e7afa9981e56ea2b15309da385ccd0ea1cb43e5f24
Contents?: true
Size: 435 Bytes
Versions: 6
Compression:
Stored size: 435 Bytes
Contents
# frozen_string_literal: true module ActiveRecord module ValidationsRepairHelper extend ActiveSupport::Concern module ClassMethods def repair_validations(*model_classes) teardown do model_classes.each(&:clear_validators!) end end end def repair_validations(*model_classes) yield if block_given? ensure model_classes.each(&:clear_validators!) end end end
Version data entries
6 entries across 6 versions & 2 rubygems