diff --git a/app/controllers/admin/candidate_controller.rb b/app/controllers/admin/candidate_controller.rb index 843f762..7564886 100644 --- a/app/controllers/admin/candidate_controller.rb +++ b/app/controllers/admin/candidate_controller.rb @@ -54,7 +54,7 @@ module Admin private def candidate_params - params.require(:candidate).permit(:name, :email, :experience, :quiz_id) + params.require(:candidate).permit(:name, :email, :experience, :quiz_id, :project) end def collect_quizzes diff --git a/app/models/candidate.rb b/app/models/candidate.rb index 21e6ac8..5d4df2b 100644 --- a/app/models/candidate.rb +++ b/app/models/candidate.rb @@ -14,6 +14,7 @@ class Candidate < ApplicationRecord validates :recruiter_id, presence: true validates :name, presence: true validates :experience, presence: true + validates :project, presence: true validates :email, uniqueness: true, presence: true, email_format: true validates :test_hash, uniqueness: true, presence: true diff --git a/app/views/admin/candidate/_form.html.erb b/app/views/admin/candidate/_form.html.erb index 0310471..6337130 100644 --- a/app/views/admin/candidate/_form.html.erb +++ b/app/views/admin/candidate/_form.html.erb @@ -16,6 +16,11 @@ <%= form.select :experience, experience_options(candidate.experience), include_blank: false %> +
You will be notified when the candidate has finished taking the test.
- \ No newline at end of file + diff --git a/app/views/recruiter_mailer/candidate_created.text.erb b/app/views/recruiter_mailer/candidate_created.text.erb index 56b001b..c16e184 100644 --- a/app/views/recruiter_mailer/candidate_created.text.erb +++ b/app/views/recruiter_mailer/candidate_created.text.erb @@ -6,5 +6,6 @@ Candidate name: <%= @candidate.name %> Candidate email: <%= @candidate.email %> Candidate ID: <%= @candidate.test_hash %> Years of experience: <%= @candidate.experience %> Years +Client/Project: <%= @candidate.project %> You will be notified when the candidate has finished taking the test. diff --git a/app/views/reviewer_mailer/candidate_submission.html.inky b/app/views/reviewer_mailer/candidate_submission.html.inky index 1c5a20f..eeaed3d 100644 --- a/app/views/reviewer_mailer/candidate_submission.html.inky +++ b/app/views/reviewer_mailer/candidate_submission.html.inky @@ -1,6 +1,9 @@Candidate <%= @candidate.test_hash %> has completed the Skills Assessment Test.
++ Candidate <%= @candidate.test_hash %> has completed the + Skills Assessment Test for client/project <%= @candidate.project %>. +
You can view the results here: <%= link_to nil, admin_result_url(@candidate.test_hash) %>.