Sha256: 834d5b7631a42745ffcbf0cd12c3b28704f472de8a97c7836bbfeca279f3fd75

Contents?: true

Size: 838 Bytes

Versions: 103

Compression:

Stored size: 838 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 Group < 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
  belongs_to :account, primary_key: :canvas_id, foreign_key: :canvas_account_id, optional: true
  has_many :group_memberships, primary_key: :canvas_id, foreign_key: :canvas_group_id

  api_syncable({
    canvas_id: :id,
    name: :name,
    canvas_course_id: :course_id,
    sis_id: :sis_group_id,
    workflow_state: ->(r){ 'available' },
  }, -> (api) { api.group(canvas_id) })
end

Version data entries

103 entries across 103 versions & 1 rubygems

Version Path
canvas_sync-0.17.26.beta1 spec/dummy/app/models/group.rb
canvas_sync-0.17.24 spec/dummy/app/models/group.rb
canvas_sync-0.17.23 spec/dummy/app/models/group.rb
canvas_sync-0.17.23.beta8 spec/dummy/app/models/group.rb
canvas_sync-0.17.23.beta7 spec/dummy/app/models/group.rb
canvas_sync-0.17.23.beta6 spec/dummy/app/models/group.rb
canvas_sync-0.17.23.beta5 spec/dummy/app/models/group.rb
canvas_sync-0.17.23.beta4 spec/dummy/app/models/group.rb
canvas_sync-0.17.23.beta2 spec/dummy/app/models/group.rb
canvas_sync-0.17.23.beta1 spec/dummy/app/models/group.rb
canvas_sync-0.17.20 spec/dummy/app/models/group.rb
canvas_sync-0.17.19 spec/dummy/app/models/group.rb
canvas_sync-0.17.18 spec/dummy/app/models/group.rb
canvas_sync-0.17.17.beta1 spec/dummy/app/models/group.rb
canvas_sync-0.17.16 spec/dummy/app/models/group.rb
canvas_sync-0.17.15 spec/dummy/app/models/group.rb
canvas_sync-0.17.14 spec/dummy/app/models/group.rb
canvas_sync-0.17.13 spec/dummy/app/models/group.rb
canvas_sync-0.17.12 spec/dummy/app/models/group.rb
canvas_sync-0.17.10.beta2 spec/dummy/app/models/group.rb