<commit_before>class LessonPlanMilestone < ActiveRecord::Base
  attr_accessible :title, :description, :end_at, :start_at, :is_publish

  belongs_to :course
  belongs_to :creator, class_name: "User"

  validates :start_at, presence: true, allow_blank: false

  # Creates a virtual item of this class that is backed by some other data store.
  def self.create_virtual(*args)
    (Class.new do
        def initialize(title, other_entries)
          @title = title
          @previous_milestone = nil
          @next_milestone = nil
          @other_entries = other_entries
        end

        def title
          @title
        end
        def description
          nil
        end
        def entries
          @other_entries
        end
        def start_at
          nil
        end
        def end_at
          nil
        end
        def previous_milestone
          @previous_milestone
        end
        def previous_milestone=(milestone)
          @previous_milestone = milestone
        end
        def next_milestone
          @next_milestone
        end
        def next_milestone=(milestone)
          @next_milestone = milestone
        end
        def is_virtual?
          true<commit_msg>fix load virtual milestone<commit_after>class LessonPlanMilestone < ActiveRecord::Base
  attr_accessible :title, :description, :end_at, :start_at, :is_publish

  belongs_to :course
  belongs_to :creator, class_name: "User"

  validates :start_at, presence: true, allow_blank: false

  # Creates a virtual item of this class that is backed by some other data store.
  def self.create_virtual(*args)
    (Class.new do
        def initialize(title, other_entries)
          @title = title
          @previous_milestone = nil
          @next_milestone = nil
          @other_entries = other_entries
        end

        def title
          @title
        end
        def description
          nil
        end
        def entries (include_virtual = true, user_course = nil)
          @other_entries
        end
        def start_at
          nil
        end
        def end_at
          nil
        end
        def previous_milestone
          @previous_milestone
        end
        def previous_milestone=(milestone)
          @previous_milestone = milestone
        end
        def next_milestone
          @next_milestone
        end
        def next_milestone=(milestone)
          @next_milestone = milestone
        end
        def is_virtual?
          true
{'fraction_non_alphanumeric': 0.05075111652456354, 'fraction_numerical': 0.0, 'mean_word_length': 1.8256880733944953, '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': '4022391', 'n_tokens_mistral': 668, 'n_tokens_neox': 656, 'n_words': 192}