Sha256: ccf2e16bbd30e0d2c3e03106fec1d77b14025fd65c57fe59f1b75e7f447051a8

Contents?: true

Size: 353 Bytes

Versions: 7

Compression:

Stored size: 353 Bytes

Contents

<%= autogenerated_model_warning %>

class User < ApplicationRecord
  validates :canvas_user_id, uniqueness: true, presence: true
  has_many :enrollments, primary_key: :canvas_user_id, foreign_key: :canvas_user_id
  has_many :admins, foreign_key: :canvas_user_id, primary_key: :canvas_user_id
  has_many :admin_roles, through: :admins, source: :role
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
canvas_sync-0.3.13 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.3.12 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.3.11 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.3.10 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.3.9 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.3.8 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.3.7 lib/canvas_sync/generators/templates/models/user.rb