<commit_before>require "attachable/active_record_extensions"
require "attachable/engine"
require "rails_admin"
require "rails_admin/config/fields/types/images"

module Attachable
  @use_translations = proc { I18n.available_locales.count > 1 }
  @subdomain = false
  @assets_domain = false

  class << self
    attr_accessor :use_translations
    attr_accessor :subdomain
    attr_accessor :assets_domain
    def use_translations?
      if @use_translations.is_a?(Proc)
        return !!@use_translations.call
      else
        return false
      end
    end

    def subdomain?
      !!@subdomain && @subdomain.present?
    end

    def assets_domain?
      !!@assets_domain && @assets_domain.present?
    end
  end
end<commit_msg>check if ActiveRecord::Base respond_to :translates<commit_after>require "attachable/active_record_extensions"
require "attachable/engine"
require "rails_admin"
require "rails_admin/config/fields/types/images"

module Attachable
  @use_translations = proc { ActiveRecord::Base.respond_to?(:translates?) && I18n.available_locales.count > 1 }
  @subdomain = false
  @assets_domain = false

  class << self
    attr_accessor :use_translations
    attr_accessor :subdomain
    attr_accessor :assets_domain
    def use_translations?
      if @use_translations.is_a?(Proc)
        return !!@use_translations.call
      else
        return !!@use_translations
      end
    end

    def subdomain?
      !!@subdomain && @subdomain.present?
    end

    def assets_domain?
      !!@assets_domain && @assets_domain.present?
    end
  end
end
{'fraction_non_alphanumeric': 0.08829174664107485, 'fraction_numerical': 0.003838771593090211, 'mean_word_length': 3.6272189349112427, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '5128667', 'n_tokens_mistral': 499, 'n_tokens_neox': 486, 'n_words': 102}