Sha256: 1823353998a7208bfca473174effa8652a57e24a79c8ae168b79bc1ff8700716

Contents?: true

Size: 437 Bytes

Versions: 27

Compression:

Stored size: 437 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
  has_many :submissions, primary_key: :canvas_user_id, foreign_key: :canvas_user_id
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
canvas_sync-0.3.20 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.3.19 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.3.18 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.3.17 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.3.16 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.3.15 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.3.14 lib/canvas_sync/generators/templates/models/user.rb