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.22.6 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.22.5 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.22.4 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.22.3 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.22.2 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.22.1 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.22.0 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.22.0.beta8 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.22.0.beta7 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.22.0.beta6 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.22.0.beta5 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.22.0.beta4 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.22.0.beta3 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.22.0.beta2 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.22.0.beta1 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.21.1 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.21.1.beta1 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.21.0 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.21.0.beta5 lib/canvas_sync/generators/templates/models/learning_outcome.rb
canvas_sync-0.21.0.beta4 lib/canvas_sync/generators/templates/models/learning_outcome.rb