<commit_before># require 'apartment/elevators/generic'
require 'apartment/elevators/domain'
# require 'apartment/elevators/subdomain'
# require 'apartment/elevators/first_subdomain'

#
# Apartment Configuration
#
Apartment.configure do |config|
  config.excluded_models = %w[Site AdminUser]

  config.tenant_names = lambda {
    Site.pluck(:domain).map { |domain| domain.tr('.', '_') }
  }
  config.use_sql = true

  # config.persistent_schemas = %w{ hstore }
end

# Rails.application.config.middleware.use Apartment::Elevators::Domain
# Rails.application.config.middleware.use Apartment::Elevators::Subdomain
# Rails.application.config.middleware.use Apartment::Elevators::FirstSubdomain
Rails.application.config.middleware.use FullHostElevators
<commit_msg>Fix tenant name not configure for apartment<commit_after># require 'apartment/elevators/generic'
require 'apartment/elevators/domain'
# require 'apartment/elevators/subdomain'
# require 'apartment/elevators/first_subdomain'

#
# Apartment Configuration
#
Apartment.configure do |config|
  config.excluded_models = %w[Site AdminUser]

  config.tenant_names = lambda { Site.pluck(:tenant_name) }
  config.use_sql = true

  # config.persistent_schemas = %w{ hstore }
end

# Rails.application.config.middleware.use Apartment::Elevators::Domain
# Rails.application.config.middleware.use Apartment::Elevators::Subdomain
# Rails.application.config.middleware.use Apartment::Elevators::FirstSubdomain
Rails.application.config.middleware.use FullHostElevators

{'fraction_non_alphanumeric': 0.1152317880794702, 'fraction_numerical': 0.0, 'mean_word_length': 6.3707317073170735, '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': '103989', 'n_tokens_mistral': 488, 'n_tokens_neox': 476, 'n_words': 76}