Sha256: 5c6d2a10afa2935fe48d577de8d79f6e4ba0e2542263ab1aaa67866a322a0bf6

Contents?: true

Size: 737 Bytes

Versions: 21

Compression:

Stored size: 737 Bytes

Contents

# frozen_string_literal: true

module NeetoCommonsBackend
  module SampleData
    module Common
      class LoaderService < Common::Base
        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

        private

          def load_sample_data!
            ::SampleData::LoadersList.get.each do |loader_service|
              loader_service.new.load!
            end
          end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
neeto-commons-backend-1.0.109 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.108 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.107 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.106 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.105 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.104 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.103 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.102 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.101 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.100 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.99 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.98 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.97 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.96 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.95 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.94 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.93 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.92 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.91 app/services/neeto_commons_backend/sample_data/common/loader_service.rb
neeto-commons-backend-1.0.90 app/services/neeto_commons_backend/sample_data/common/loader_service.rb