Add StudyGroups with ExternalUsers only
This commit is contained in:
8
app/models/study_group_membership.rb
Normal file
8
app/models/study_group_membership.rb
Normal file
@ -0,0 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class StudyGroupMembership < ApplicationRecord
|
||||
belongs_to :user, polymorphic: true
|
||||
belongs_to :study_group
|
||||
|
||||
validates_uniqueness_of :user_id, :scope => [:user_type, :study_group_id]
|
||||
end
|
Reference in New Issue
Block a user