<commit_before># Region is a special type of category that is related to geographical issues. 
class Region < Category
  has_and_belongs_to_many :validators, :class_name => 'Organization', :join_table => :region_validators

  require_dependency 'enterprise' # enterprises can also be validators

  def has_validator?
    validators.count > 0
  end

  named_scope :with_validators, :select => 'DISTINCT categories.id',
    :joins => 'INNER JOIN region_validators on (region_validators.region_id = categories.id)'

end

require_dependency 'city'
require_dependency 'state'
<commit_msg>[postgres-tests] Fixing enterprise registration tests<commit_after># Region is a special type of category that is related to geographical issues. 
class Region < Category
  has_and_belongs_to_many :validators, :class_name => 'Organization', :join_table => :region_validators

  require_dependency 'enterprise' # enterprises can also be validators

  def has_validator?
    validators.count > 0
  end

  named_scope :with_validators, :select => 'DISTINCT ON (categories.id) *',
    :joins => 'INNER JOIN region_validators on (region_validators.region_id = categories.id)'

end

require_dependency 'city'
require_dependency 'state'

{'fraction_non_alphanumeric': 0.08244023083264633, 'fraction_numerical': 0.0016488046166529267, 'mean_word_length': 5.526881720430108, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '3785503', 'n_tokens_mistral': 373, 'n_tokens_neox': 351, 'n_words': 109}