Genshin/GAKUEngine

View on GitHub
core/app/models/concerns/gradable.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Gradable
  extend ActiveSupport::Concern

  included do
    has_many :grading_method_connectors, as: :gradable
    has_many :grading_methods, through: :grading_method_connectors

    has_many :exam_portion_scores, as: :gradable
  end

  def use_primary_grading_method_set
    grading_methods << Gaku::GradingMethodSet.primary.grading_methods if Gaku::GradingMethodSet.primary
  end
end