lib/canvas_sync/generators/templates/models/term.rb in canvas_sync-0.17.23.beta4 vs lib/canvas_sync/generators/templates/models/term.rb in canvas_sync-0.17.23.beta5
- old
+ new
@@ -4,9 +4,10 @@
include CanvasSync::Record
include CanvasSync::Concerns::ApiSyncable
validates :canvas_id, uniqueness: true, presence: true
has_many :courses, foreign_key: :canvas_term_id, primary_key: :canvas_id
+ belongs_to :grading_period_group, primary_key: :canvas_id, foreign_key: :grading_period_group_id, optional: true
api_syncable({
canvas_id: :id,
name: :name,
sis_id: :sis_term_id,