Class: Org::ExamMailer

Inherits:
ApplicationMailer
  • Object
show all
Defined in:
app/mailers/org/exam_mailer.rb

Instance Method Summary collapse

Instance Method Details

#result(exam_id) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'app/mailers/org/exam_mailer.rb', line 15

def result(exam_id)
  @exam = Exam.find exam_id
  if @exam.member
    mail(
      to: @exam.member.user.email,
      subject: '[Training] Score come out'
    )
  end
end

#review(exam_id) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'app/mailers/org/exam_mailer.rb', line 4

def review(exam_id)
  @exam = Exam.find exam_id
  if @exam.lesson.lecturer
    mail(
      from: @exam.member.email,
      to: @exam.reviewer.email,
      subject: '[Training] Exam Finished'
    )
  end
end