Sha256: 00ce9357903f33dc8d6ca4d125b614330d27959f38d00da27d55a65c1a0b0a87

Contents?: true

Size: 722 Bytes

Versions: 1

Compression:

Stored size: 722 Bytes

Contents

#
# AUTO GENERATED MODEL
# This model was auto generated by the CanvasSync Gem.
# You can customize it as needed, but make sure you test
# any changes you make to the auto generated methods.
#


class Course < ApplicationRecord
  validates :canvas_course_id, uniqueness: true, presence: true
  belongs_to :term, foreign_key: :canvas_term_id, primary_key: :canvas_term_id, optional: true
  has_many :enrollments, primary_key: :canvas_course_id, foreign_key: :canvas_course_id
  has_many :sections, primary_key: :canvas_course_id, foreign_key: :canvas_course_id
  has_many :assignments, as: :context, primary_key: :canvas_course_id
  has_many :submissions, primary_key: :canvas_course_id, foreign_key: :canvas_course_id
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
canvas_sync-0.3.14 spec/dummy/app/models/course.rb