<commit_before>module Locomotive
  class Site

    include Locomotive::Mongoid::Document

    ## Extensions ##
    extend  Extensions::Site::SubdomainDomains
    extend  Extensions::Site::FirstInstallation
    include Extensions::Shared::Seo
    include Extensions::Site::Locales

    ## fields ##
    field :name
    field :robots_txt

    ## associations ##
    references_many :pages,           class_name: 'Locomotive::Page',          validate: false
    references_many :snippets,        class_name: 'Locomotive::Snippet',       dependent: :destroy, validate: false
    references_many :theme_assets,    class_name: 'Locomotive::ThemeAsset',    dependent: :destroy, validate: false
    references_many :content_assets,  class_name: 'Locomotive::ContentAsset',  dependent: :destroy, validate: false
    references_many :content_types,   class_name: 'Locomotive::ContentType',   dependent: :destroy, validate: false
    references_many :translations,    class_name: 'Locomotive::Translation',   dependent: :destroy, validate: false
    embeds_many     :memberships,     class_name: 'Locomotive::Membership'

    ## validations ##<commit_msg>Replaced relation references_many with has_many<commit_after>module Locomotive
  class Site

    include Locomotive::Mongoid::Document

    ## Extensions ##
    extend  Extensions::Site::SubdomainDomains
    extend  Extensions::Site::FirstInstallation
    include Extensions::Shared::Seo
    include Extensions::Site::Locales

    ## fields ##
    field :name
    field :robots_txt

    ## associations ##
    has_many :pages,           class_name: 'Locomotive::Page',          validate: false
    has_many :snippets,        class_name: 'Locomotive::Snippet',       dependent: :destroy, validate: false
    has_many :theme_assets,    class_name: 'Locomotive::ThemeAsset',    dependent: :destroy, validate: false
    has_many :content_assets,  class_name: 'Locomotive::ContentAsset',  dependent: :destroy, validate: false
    has_many :content_types,   class_name: 'Locomotive::ContentType',   dependent: :destroy, validate: false
    has_many :translations,    class_name: 'Locomotive::Translation',   dependent: :destroy, validate: false
    embeds_many     :memberships,     class_name: 'Locomotive::Membership'

    ## validations ##
{'fraction_non_alphanumeric': 0.10263157894736842, 'fraction_numerical': 0.0, 'mean_word_length': 4.195899772209567, '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': '1756338', 'n_tokens_mistral': 651, 'n_tokens_neox': 637, 'n_words': 148}