progress on #27: test coverage over 96%
This commit is contained in:
@ -109,10 +109,4 @@ class QuizController < ApplicationController
|
||||
saved: params.key?(:save),
|
||||
submitted: params.key?(:submit))
|
||||
end
|
||||
|
||||
def process_live_code_text
|
||||
@answer.update(answer: answer_params[:live_code_text].to_h,
|
||||
saved: params.key?(:save),
|
||||
submitted: params.key?(:submit))
|
||||
end
|
||||
end
|
||||
|
@ -37,6 +37,9 @@ class Candidate < ApplicationRecord
|
||||
"#{my_status.progress}%"
|
||||
end
|
||||
|
||||
# FIXME: This feels wrong here. Mail deliveries should be in controller.
|
||||
# Privatize in QuizController
|
||||
# also, bang methods in ruby do an action and replace, or return nil
|
||||
def complete!
|
||||
if update_attributes(completed: true)
|
||||
CandidateMailer.submitted(self).deliver_now
|
||||
|
Reference in New Issue
Block a user