Class: NeetoCommonsBackend::SampleData::Common::LoaderService

Inherits:
Base
  • Object
show all
Defined in:
app/services/neeto_commons_backend/sample_data/common/loader_service.rb

Instance Method Summary collapse

Methods inherited from Base

#admin, #app_secrets, #description, #heroku_or_development_env?, #load!, #organization, #print_description, #print_success, #skip?

Instance Method Details

#process!Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/services/neeto_commons_backend/sample_data/common/loader_service.rb', line 7

def process!
  return if skip?

  ActiveRecord::Base.descendants.map(&:reset_column_information)
  Rails.logger.debug { "\n#{'-' * 80}" }
  Rails.logger.debug "Loading sample data..."
  ActiveRecord::Base.logger.level = Logger::INFO

  load_sample_data!
  Rails.logger.debug { "#{'-' * 80}\n" }
  true
end