Method: Hyrax::DataDestroyers::DefaultAdminSetIdCacheDestroyer.destroy_data

Defined in:
app/utils/hyrax/data_destroyers/default_admin_set_id_cache_destroyer.rb

.destroy_data(logger: Logger.new(STDOUT), allow_destruction_in_production: false) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'app/utils/hyrax/data_destroyers/default_admin_set_id_cache_destroyer.rb', line 14

def destroy_data(logger: Logger.new(STDOUT), allow_destruction_in_production: false)
  raise("DefaultAdminSetIdCacheDestroyer is not for use in production!") if Rails.env.production? && !allow_destruction_in_production
  @logger = logger

  logger.info("Destroying default admin set id cache...")

  Hyrax::DefaultAdministrativeSet.destroy_all
  logger.info("   default admin set id cache -- DESTROYED")
end