<commit_before>module QuestionBank
  class Point
    # 知识点
    include Mongoid::Document
    include Mongoid::Timestamps

    field :name,  type: String

    validates :name,  presence: true

    module QuestionMethods
      extend ActiveSupport::Concern
      included do
        has_and_belongs_to_many :points, class_name: "QuestionBank::Question", inverse_of: :questions
        scope :with_point, ->(point_name) {
          id = QuestionBank::Point.where(:name => point_name).first.try(:id)
          where(:point_ids.in => [id])
        }
      end

      module ClassMethods
      end
    end
  end<commit_msg>修复知识点关联BUG<commit_after>module QuestionBank
  class Point
    # 知识点
    include Mongoid::Document
    include Mongoid::Timestamps

    field :name,  type: String

    validates :name,  presence: true

    module QuestionMethods
      extend ActiveSupport::Concern
      included do
        has_and_belongs_to_many :points, class_name: "QuestionBank::Point", inverse_of: nil
        scope :with_point, ->(point_name) {
          id = QuestionBank::Point.where(:name => point_name).first.try(:id)
          where(:point_ids.in => [id])
        }
      end

      module ClassMethods
      end
    end
  end
{'fraction_non_alphanumeric': 0.09090909090909091, 'fraction_numerical': 0.0, 'mean_word_length': 2.691842900302115, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '2993578', 'n_tokens_mistral': 374, 'n_tokens_neox': 370, 'n_words': 85}