Sha256: d2d2a1aa504713720382da582d2c4f8f78da59cee2bbcde91f5eed15da34e6b2

Contents?: true

Size: 796 Bytes

Versions: 26

Compression:

Stored size: 796 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 Assignment < ApplicationRecord
  validates :canvas_assignment_id, uniqueness: true, presence: true
  belongs_to :context, polymorphic: true, optional: true, primary_key: :canvas_course_id
  belongs_to :assignment_group, optional: true, primary_key: :canvas_assignment_group_id, foreign_key: :canvas_assignment_group_id
  has_many :submissions, primary_key: :canvas_assignment_id, foreign_key: :canvas_assignment_id
  has_many :context_module_items, primary_key: :canvas_assignment_id, foreign_key: :content_id, dependent: :destroy
  has_many :context_modules, through: :context_module_items
end

Version data entries

26 entries across 26 versions & 1 rubygems

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