Sha256: f6e20151ee57336c1019adcae65d2aa355f106465926a03e3bbc80dcf76ceb74
Contents?: true
Size: 518 Bytes
Versions: 9
Compression:
Stored size: 518 Bytes
Contents
class ExamAuthorizationRequest < ApplicationRecord include TerminalNavigation belongs_to :exam belongs_to :user belongs_to :organization belongs_to :exam_registration enum status: %i(pending approved rejected) after_update :notify_user! def try_authorize! exam.authorize! user if approved? end def name exam_registration.description end private def notify_user! Notification.create! organization: organization, user: user, target: self if saved_change_to_status? end end
Version data entries
9 entries across 9 versions & 1 rubygems