Sha256: e18855eed51b23d58af663f8aeb54e79b4a188984790ba045c79915ea8a7c27e

Contents?: true

Size: 604 Bytes

Versions: 53

Compression:

Stored size: 604 Bytes

Contents

# <%= autogenerated_model_warning %>

class GroupMembership < ApplicationRecord
  include CanvasSync::Record
  include CanvasSync::Concerns::ApiSyncable

  canvas_sync_features :defaults

  validates :canvas_id, uniqueness: true, presence: true
  belongs_to :group, primary_key: :canvas_id, foreign_key: :canvas_group_id
  belongs_to :user, primary_key: :canvas_id, foreign_key: :canvas_user_id

  api_syncable({
    canvas_id: :id,
    canvas_group_id: :group_id,
    canvas_user_id: :user_id,
    workflow_state: :workflow_state,
  }, -> (api) { api.group_membership(canvas_group_id, canvas_id) })
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
canvas_sync-0.22.9 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.22.8 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.22.6 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.22.5 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.22.4 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.22.3 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.22.2 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.22.1 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.22.0 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.22.0.beta8 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.22.0.beta7 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.22.0.beta6 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.22.0.beta5 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.22.0.beta4 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.22.0.beta3 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.22.0.beta2 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.22.0.beta1 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.21.1 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.21.1.beta1 lib/canvas_sync/generators/templates/models/group_membership.rb
canvas_sync-0.21.0 lib/canvas_sync/generators/templates/models/group_membership.rb