<commit_before># frozen_string_literal: true
class Course::Video < ActiveRecord::Base
  acts_as_lesson_plan_item has_todo: true

  include Course::ReminderConcern

  after_initialize :set_defaults, if: :new_record?

  has_many :submissions, inverse_of: :video, dependent: :destroy

  def self.use_relative_model_naming?
    true
  end

  def to_partial_path
    'course/video/videos/video'.freeze
  end

  private

  def set_defaults
    self.published = false
  end
end
<commit_msg>Define a more verbose association, also to circumvent circular dependency issue while loading in production<commit_after># frozen_string_literal: true
class Course::Video < ActiveRecord::Base
  acts_as_lesson_plan_item has_todo: true

  include Course::ReminderConcern

  after_initialize :set_defaults, if: :new_record?

  has_many :submissions, class_name: Course::Video::Submission.name,
                         inverse_of: :video, dependent: :destroy

  def self.use_relative_model_naming?
    true
  end

  def to_partial_path
    'course/video/videos/video'.freeze
  end

  private

  def set_defaults
    self.published = false
  end
end

{'fraction_non_alphanumeric': 0.06908768821966342, 'fraction_numerical': 0.0, 'mean_word_length': 4.305164319248826, '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': '2102134', 'n_tokens_mistral': 369, 'n_tokens_neox': 344, 'n_words': 88}