Sha256: 257972121657ce36cf0262cbf255e12fc7af188fe940934ccadc9151b6e5aa32

Contents?: true

Size: 823 Bytes

Versions: 104

Compression:

Stored size: 823 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 AssignmentGroup < ApplicationRecord
  include CanvasSync::Record
  include CanvasSync::Concerns::ApiSyncable

  validates :canvas_id, uniqueness: true, presence: true
  belongs_to :course, primary_key: :canvas_id, foreign_key: :canvas_course_id, optional: true
  has_many :assignments, primary_key: :canvas_id, foreign_key: :canvas_assignment_group_id

  serialize :rules

  api_syncable({
    canvas_id: :id,
    name: :name,
    position: :position,
    rules: :rules,
    group_weight: :group_weight,
    workflow_state: ->(p) { 'available' },
  }, -> (api) { api.assignment_group(canvas_course_id, canvas_id) })
end

Version data entries

104 entries across 104 versions & 1 rubygems

Version Path
canvas_sync-0.17.0.beta15 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.17.0.beta14 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.17.0.beta13 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.17.0.beta12 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.17.0.beta11 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.17.0.beta10 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.17.0.beta9 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.17.0.beta8 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.17.0.beta7 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.17.0.beta6 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.17.0.beta5 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.17.0.beta4 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.16.5 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.17.0.beta3 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.17.0.beta2 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.17.0.beta1 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.16.4 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.16.3 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.16.2 spec/dummy/app/models/assignment_group.rb
canvas_sync-0.16.1 spec/dummy/app/models/assignment_group.rb