<commit_before>module Ckeditor
  class AttachmentFileUploader < CarrierWave::Uploader::Base
    include Ckeditor::Backend::CarrierWave

    storage :fog

    def store_dir
      "assets/#{model.id}"
    end<commit_msg>Use file storage for documents if cloudinary is selected<commit_after>module Ckeditor
  class AttachmentFileUploader < CarrierWave::Uploader::Base
    include Ckeditor::Backend::CarrierWave

    # Fallback to file system. Files will be attached to emails when sent
    case Georgia.storage
    when :fog then storage(:fog)
    when :cloudinary then storage(:file)
    end

    def store_dir
      "assets/#{model.id}"
    end
{'fraction_non_alphanumeric': 0.07776049766718507, 'fraction_numerical': 0.0, 'mean_word_length': 3.9160305343511452, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5541466', 'n_tokens_mistral': 193, 'n_tokens_neox': 186, 'n_words': 54}