<commit_before>class Student < ActiveRecord::Base
  belongs_to :homeroom, counter_cache: true
  belongs_to :school
  has_many :student_school_years
  has_many :student_assessments
  has_many :assessments, through: :student_assessments
  has_many :interventions, dependent: :destroy
  has_many :student_notes
  has_many :event_notes, dependent: :destroy
  has_many :services, dependent: :destroy
  has_one :student_risk_level, dependent: :destroy

  validates_presence_of :local_id
  validates_uniqueness_of :local_id
  validate :valid_grade<commit_msg>Enforce dependent: destroy on student assessments<commit_after>class Student < ActiveRecord::Base
  belongs_to :homeroom, counter_cache: true
  belongs_to :school
  has_many :student_school_years, dependent: :destroy
  has_many :student_assessments, dependent: :destroy
  has_many :assessments, through: :student_assessments
  has_many :interventions, dependent: :destroy
  has_many :student_notes, dependent: :destroy
  has_many :event_notes, dependent: :destroy
  has_many :services, dependent: :destroy
  has_one :student_risk_level, dependent: :destroy

  validates_presence_of :local_id
  validates_uniqueness_of :local_id
  validate :valid_grade
{'fraction_non_alphanumeric': 0.06816292601828762, 'fraction_numerical': 0.0, 'mean_word_length': 7.135135135135135, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6113238', 'n_tokens_mistral': 380, 'n_tokens_neox': 376, 'n_words': 92}