Fixed and updated Participant Module.
This commit is contained in:
parent
d8fe866b68
commit
bdfdf6942a
|
@ -83,9 +83,25 @@ class ParticipantsController < ApplicationController
|
|||
end
|
||||
|
||||
def participant_params
|
||||
params.require(:participant).permit(:first_name, :last_name, :address, :phone, :email, :mci, :dob, :ssn, :gender, :employer_id)
|
||||
params.require(:participant).permit(
|
||||
:first_name,
|
||||
:last_name,
|
||||
:address_line_1,
|
||||
:address_line_2,
|
||||
:city,
|
||||
:state,
|
||||
:zip,
|
||||
:phone,
|
||||
:email,
|
||||
:mci,
|
||||
:dob,
|
||||
:ssn,
|
||||
:gender,
|
||||
:employer_id
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
def employer_params_from_participant(participant)
|
||||
{
|
||||
first_name: participant.first_name,
|
||||
|
@ -103,10 +119,6 @@ class ParticipantsController < ApplicationController
|
|||
}
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def employment_params
|
||||
params.require(:employment).permit(:worker_id, :start_date, :end_date)
|
||||
end
|
||||
|
|
|
@ -38,8 +38,6 @@
|
|||
<%= link_to participant, class: 'btn btn-sm btn-secondary' do %>
|
||||
<i class="bi bi-eye"></i><!-- Eyeball icon for 'Show' -->
|
||||
<% end %>
|
||||
|
||||
|
||||
<%= link_to edit_participant_path(participant), class: 'btn btn-sm btn-info' do %>
|
||||
<i class="bi bi-pencil-fill" style="color: white;"></i> <!-- Pencil icon for 'Edit' with white color -->
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue