diff --git a/app/controllers/participants_controller.rb b/app/controllers/participants_controller.rb index 00542a9..e6d1683 100644 --- a/app/controllers/participants_controller.rb +++ b/app/controllers/participants_controller.rb @@ -26,7 +26,10 @@ class ParticipantsController < ApplicationController if params[:is_employer] == 'yes' create_employer_and_employer_record_for(@participant) elsif params[:employer_id].present? + # Assign the selected employer_id to the participant @participant.employer_id = params[:employer_id] + # Create an EmployerRecord with start_date as current date + EmployerRecord.create!(participant: @participant, employer_id: @participant.employer_id, start_date: Date.today) end if @participant.save