Sha256: ce31117f0a12f01978c83ce0a37f70a20a664cdb90c66077424d4f49a1963235
Contents?: true
Size: 1.19 KB
Versions: 17
Compression:
Stored size: 1.19 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_assessments, through: :rubric_associations, dependent: :destroy has_many :rubric_associations, primary_key: :canvas_id, foreign_key: :canvas_rubric_id has_many :associated_objects, through: :rubric_associations, source: :association_object 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
17 entries across 17 versions & 1 rubygems