Store whether learners were manually invited to a programming group
This commit is contained in:
@ -12,10 +12,11 @@ class PairProgrammingWaitingUser < ApplicationRecord
|
||||
disconnected: 2,
|
||||
worked_alone: 3,
|
||||
created_pg: 4,
|
||||
invited_to_pg: 5,
|
||||
}, _prefix: true
|
||||
|
||||
validates :user_id, uniqueness: {scope: %i[exercise_id user_type]}
|
||||
validates :programming_group_id, presence: true, if: -> { status_joined_pg? || status_created_pg? }
|
||||
validates :programming_group_id, presence: true, if: -> { status_joined_pg? || status_created_pg? || status_invited_to_pg? }
|
||||
|
||||
after_save :capture_event
|
||||
|
||||
|
Reference in New Issue
Block a user