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.8.1 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.8.0 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.7.3 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.7.2 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.7.1 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.7.0 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.6.4 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.6.3 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.6.2 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.6.1 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.6.0 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.5.4 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.5.3 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.5.2 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.5.1 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.4.1 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.4.0 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.3.23 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.3.22 lib/canvas_sync/generators/templates/models/user.rb
canvas_sync-0.3.21 lib/canvas_sync/generators/templates/models/user.rb