Sha256: 9d15ed85d22ddbac0a1b87b0a14c2fb6efea941a954146072787d6a82c56b9b1
Contents?: true
Size: 456 Bytes
Versions: 4
Compression:
Stored size: 456 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
4 entries across 4 versions & 1 rubygems