Sha256: c9d68198111dc9c291dc275f76b7e6ca0c543ab7d02f976edf0365561b50864b

Contents?: true

Size: 716 Bytes

Versions: 10

Compression:

Stored size: 716 Bytes

Contents

# frozen_string_literal: true

# # <%= autogenerated_migration_warning %>

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

  belongs_to :context, polymorphic: true, optional: true, primary_key: :canvas_id, foreign_key: :canvas_context_id, foreign_type: :canvas_context_type

  api_syncable({
    canvas_id: :id,
    canvas_context_id: :context_id,
    canvas_context_type: :context_type,
    name: :title,
    friendly_name: :display_name,
    vendor_guid: :vendor_guid,
    calculation_method: :calculation_method,
    calculation_int: :calculation_int,
    description: :description
  }, ->(api) { api.get("/api/v1/outcomes/#{canvas_id}") })
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
canvas_sync-0.17.43 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.17.42 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.17.41 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.17.40 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.17.39 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.17.38 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.17.37 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.17.36 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.17.35 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.17.34 lib/canvas_sync/generators/templates/models/learning_outcome.rb