Sha256: a96542ef4dd606232439a29cb1fa9f94494fd86c25bd32bb6ac3b70f60144e1d

Contents?: true

Size: 750 Bytes

Versions: 51

Compression:

Stored size: 750 Bytes

Contents

# frozen_string_literal: true

# # <%= autogenerated_migration_warning %>

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

  canvas_sync_features :defaults

  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

51 entries across 51 versions & 1 rubygems

Version Path
canvas_sync-0.18.10 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.18.9 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.18.8 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.18.7 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.18.6 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.18.5 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.18.3 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.18.2 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.18.1 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.18.0.beta2 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.18.0.beta1 lib/canvas_sync/generators/templates/models/learning_outcome.rb