<commit_before>require 'carrierwave'

require 'carrierwave-activerecord/version'

CarrierWave::Storage.autoload :active_record, 'carrierwave/storage/active_record'

class CarrierWave::Uploader::Base
  add_config :active_record_tablename
  add_config :active_record_nocache

  configure do |config|
    config.storage_engines[:active_record] = 'CarrierWave::Storage::ActiveRecord'
    config.active_record_tablename         = 'carrier_wave_files'
    config.active_record_nocache           = false
  end
end

module Carrierwave
  module Uploader
    class Base

      if self.config.active_record_nocache?
        class ::CarrierWave::SanitizedFile
          # Rails.logger.info "copy_to called by: #{caller[0...10]}"
          # Rails.logger.info "move_to called by: #{caller[0...10]}"
          def move_to(*args); self; end
          def copy_to(*args); self; end
        end
      end

    end # Base
  end # Uploader

end

<commit_msg>autoload takes a symbolized constant name.<commit_after>require 'carrierwave'

require 'carrierwave-activerecord/version'

CarrierWave::Storage.autoload :ActiveRecord, 'carrierwave/storage/active_record'

class CarrierWave::Uploader::Base
  add_config :active_record_tablename
  add_config :active_record_nocache

  configure do |config|
    config.storage_engines[:active_record] = 'CarrierWave::Storage::ActiveRecord'
    config.active_record_tablename         = 'carrier_wave_files'
    config.active_record_nocache           = false
  end
end

module Carrierwave
  module Uploader
    class Base

      if self.config.active_record_nocache?
        class ::CarrierWave::SanitizedFile
          # Rails.logger.info "copy_to called by: #{caller[0...10]}"
          # Rails.logger.info "move_to called by: #{caller[0...10]}"
          def move_to(*args); self; end
          def copy_to(*args); self; end
        end
      end

    end # Base
  end # Uploader

end


{'fraction_non_alphanumeric': 0.09496327387198321, 'fraction_numerical': 0.0062959076600209865, 'mean_word_length': 3.404157043879908, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '948187', 'n_tokens_mistral': 628, 'n_tokens_neox': 598, 'n_words': 123}