Sha256: 48c009615855cf8c2e47cfb80e8d0601997af8bf634f28ec35551451aba7682d
Contents?: true
Size: 404 Bytes
Versions: 8
Compression:
Stored size: 404 Bytes
Contents
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
8 entries across 8 versions & 1 rubygems