Sha256: e531f7522f9a014805597c84498a9ccf5ab7acb806705522753916b1345b5c54

Contents?: true

Size: 637 Bytes

Versions: 18

Compression:

Stored size: 637 Bytes

Contents

<%= autogenerated_model_warning %>

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

18 entries across 18 versions & 1 rubygems

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