Sha256: 5d78b09b37c7b80f8c44b739b23f48686fc0d2d8b83643eff7d8717c81461c1a
Contents?: true
Size: 858 Bytes
Versions: 18
Compression:
Stored size: 858 Bytes
Contents
# frozen_string_literal: true module Hyrax module DataDestroyers # Collection types are recreated by the release seed data. Clear out here to # start with a fresh set. # # @note WARNING: DO NOT USE IN PRODUCTION! The methods in this class are destructive. # Data can not be recovered. # class CollectionTypesDestroyer class << self attr_accessor :logger def destroy_data(logger: Logger.new(STDOUT), allow_destruction_in_production: false) raise("CollectionTypesDestroyer is not for use in production!") if Rails.env.production? && !allow_destruction_in_production @logger = logger logger.info("Destroying collection types...") Hyrax::CollectionType.destroy_all logger.info(" collection types -- DESTROYED") end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems