Sha256: 73703ef2d95535dca930b3dba3d96094d34666db251a53f739fbb4af6bdd441a
Contents?: true
Size: 1.14 KB
Versions: 11
Compression:
Stored size: 1.14 KB
Contents
# <%= autogenerated_model_warning %> class Rubric < ApplicationRecord include CanvasSync::Record include CanvasSync::Concerns::ApiSyncable canvas_sync_features :defaults validates :canvas_id, uniqueness: true, presence: true belongs_to :user, primary_key: :canvas_id, foreign_key: :canvas_user_id belongs_to :rubric, primary_key: :canvas_id, foreign_key: :canvas_rubric_id # based on another rubric belongs_to :context, polymorphic: true, primary_key: :canvas_id, foreign_key: :canvas_context_id, foreign_type: :canvas_context_type has_many :rubric_associations, primary_key: :canvas_id, foreign_key: :canvas_association_id, foreign_type: :canvas_association_type has_many :rubric_assessments, through: :rubric_associations, dependent: :destroy api_syncable({ canvas_id: :id, title: :title, canvas_context_id: :context_id, canvas_context_type: :context_type, points_possible: :points_possible, reusable: :reusable, read_only: :read_only, free_form_criterion_comments: :free_form_criterion_comments, hide_score_total: :hide_score_total, data: :data, }, -> (api) { api.rubrics("self", canvas_id) }) end
Version data entries
11 entries across 11 versions & 1 rubygems