Sha256: 5809e09e0410efde59c4d461e61e965eaa7ca74b80194447d7e694be4bdeb2cf
Contents?: true
Size: 563 Bytes
Versions: 1
Compression:
Stored size: 563 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 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
canvas_sync-0.3.14 | lib/canvas_sync/generators/templates/models/course.rb |