Created function to mask SSN in Participant show view. Added to Participant helper.

This commit is contained in:
Ben 2024-01-30 16:51:32 -06:00
parent bdfdf6942a
commit ef63a37371
2 changed files with 7 additions and 2 deletions

View File

@ -1,2 +1,7 @@
module ParticipantsHelper
end
def mask_ssn(ssn)
return '' if ssn.blank?
"*****#{ssn[-4..-1]}"
end
end

View File

@ -39,7 +39,7 @@
<p class="card-text">
<strong>SSN:</strong>
<%= @participant.ssn %>
<%= mask_ssn(@participant.ssn) %>
</p>
<p class="card-text">