Sha256: 5dccc11215162c32240f475069d4210f662d14c55f01ea8b2381fcf47f22b1ef

Contents?: true

Size: 739 Bytes

Versions: 2

Compression:

Stored size: 739 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 Section < ApplicationRecord
  include CanvasSync::ApiSyncable

  validates :canvas_id, uniqueness: true, presence: true
  belongs_to :course, primary_key: :canvas_id, foreign_key: :canvas_course_id, optional: true
  has_many :enrollments, primary_key: :canvas_id, foreign_key: :canvas_section_id

  api_syncable({
    sis_id: :sis_section_id,
    canvas_course_id: :course_id,
    canvas_nonxlist_course_id: :nonxlist_course_id,
    name: :name,
    start_at: :start_at,
    end_at: :end_at,
  }, -> (api) { api.section(canvas_id) })
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
canvas_sync-0.10.2 spec/dummy/app/models/section.rb
canvas_sync-0.10.0 spec/dummy/app/models/section.rb