<commit_before>class Initiative < ApplicationRecord
  belongs_to :area

  has_many :meetings, :dependent => :destroy
  has_many :enrolments, dependent: :delete_all
  has_many :unenrolments, dependent: :delete_all
  has_many :users, through: :enrolments
  has_many :initiative_funders, dependent: :delete_all
  has_many :removed_initiative_fundings, dependent: :delete_all

  validates :name, presence: true, length: {maximum: 255}, uniqueness: {:scope => :location, case_sensitive: false}
  validates :description, presence: true, length: {maximum: 65536}
  validates :location, presence: true, length: {maximum: 65536}
  validates :area, presence: true
  validates :reason_archived, length: {maximum: 255}<commit_msg>Add through: :initiative_funders to an initiative and refactor initiative show page.<commit_after>class Initiative < ApplicationRecord
  belongs_to :area

  has_many :meetings, :dependent => :destroy
  has_many :enrolments, dependent: :delete_all
  has_many :unenrolments, dependent: :delete_all
  has_many :users, through: :enrolments
  has_many :initiative_funders, dependent: :delete_all
  has_many :funders, through: :initiative_funders
  has_many :removed_initiative_fundings, dependent: :delete_all

  validates :name, presence: true, length: {maximum: 255}, uniqueness: {:scope => :location, case_sensitive: false}
  validates :description, presence: true, length: {maximum: 65536}
  validates :location, presence: true, length: {maximum: 65536}
  validates :area, presence: true
  validates :reason_archived, length: {maximum: 255}
{'fraction_non_alphanumeric': 0.09955041746949261, 'fraction_numerical': 0.020552344251766216, 'mean_word_length': 6.712871287128713, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3935113', 'n_tokens_mistral': 517, 'n_tokens_neox': 469, 'n_words': 141}