Sha256: 12acf45b81e924d02b7a60cc6fe2d93f8cd542de3bf7b5e45f4e3b1871314d94

Contents?: true

Size: 816 Bytes

Versions: 34

Compression:

Stored size: 816 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
  has_many :assignment_groups, primary_key: :canvas_course_id, foreign_key: :canvas_course_id
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
canvas_sync-0.9.4 spec/dummy/app/models/course.rb
canvas_sync-0.9.3 spec/dummy/app/models/course.rb
canvas_sync-0.9.2 spec/dummy/app/models/course.rb
canvas_sync-0.9.1 spec/dummy/app/models/course.rb
canvas_sync-0.9.0 spec/dummy/app/models/course.rb
canvas_sync-0.8.4 spec/dummy/app/models/course.rb
canvas_sync-0.8.3 spec/dummy/app/models/course.rb
canvas_sync-0.8.2 spec/dummy/app/models/course.rb
canvas_sync-0.8.1 spec/dummy/app/models/course.rb
canvas_sync-0.8.0 spec/dummy/app/models/course.rb
canvas_sync-0.7.3 spec/dummy/app/models/course.rb
canvas_sync-0.7.2 spec/dummy/app/models/course.rb
canvas_sync-0.7.1 spec/dummy/app/models/course.rb
canvas_sync-0.7.0 spec/dummy/app/models/course.rb
canvas_sync-0.6.4 spec/dummy/app/models/course.rb
canvas_sync-0.6.3 spec/dummy/app/models/course.rb
canvas_sync-0.6.2 spec/dummy/app/models/course.rb
canvas_sync-0.6.1 spec/dummy/app/models/course.rb
canvas_sync-0.6.0 spec/dummy/app/models/course.rb
canvas_sync-0.5.4 spec/dummy/app/models/course.rb