Created function to mask SSN in Participant show view. Added to Participant helper.
This commit is contained in:
parent
bdfdf6942a
commit
ef63a37371
|
@ -1,2 +1,7 @@
|
|||
module ParticipantsHelper
|
||||
end
|
||||
def mask_ssn(ssn)
|
||||
return '' if ssn.blank?
|
||||
|
||||
"*****#{ssn[-4..-1]}"
|
||||
end
|
||||
end
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
<p class="card-text">
|
||||
<strong>SSN:</strong>
|
||||
<%= @participant.ssn %>
|
||||
<%= mask_ssn(@participant.ssn) %>
|
||||
</p>
|
||||
|
||||
<p class="card-text">
|
||||
|
|
Loading…
Reference in New Issue