Sha256: a899f351fc90bb321a11120711b28bcdd05700dd6e7a4980371b1fa6fcf45b6c

Contents?: true

Size: 657 Bytes

Versions: 26

Compression:

Stored size: 657 Bytes

Contents

<%= autogenerated_model_warning %>

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

26 entries across 26 versions & 1 rubygems

Version Path
canvas_sync-0.8.1 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.8.0 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.7.3 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.7.2 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.7.1 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.7.0 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.6.4 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.6.3 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.6.2 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.6.1 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.6.0 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.5.4 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.5.3 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.5.2 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.5.1 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.4.1 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.4.0 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.3.23 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.3.22 lib/canvas_sync/generators/templates/models/course.rb
canvas_sync-0.3.21 lib/canvas_sync/generators/templates/models/course.rb