blob: b30666d8769d50e89ad3d1aa77bf234ecf1ce756 (
plain) (
tree)
|
|
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
|