From b92c4d23a2fe9d1de10f0209f64ecf0d0d487fc2 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Wed, 20 Jul 2022 09:49:19 +0100 Subject: [PATCH] Fix multi line ternary lint error --- app/views/users/_user_list.html.erb | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/app/views/users/_user_list.html.erb b/app/views/users/_user_list.html.erb index eb24a9885..7876d77dc 100644 --- a/app/views/users/_user_list.html.erb +++ b/app/views/users/_user_list.html.erb @@ -30,16 +30,24 @@ <% if user.is_data_protection_officer? || user.is_key_contact? %>
<% end %> - <%= user.is_data_protection_officer? ? govuk_tag( - classes: "app-tag--small", - colour: "turquoise", - text: "Data protection officer", - ) : "" %> - <%= user.is_key_contact? ? govuk_tag( - classes: "app-tag--small", - colour: "turquoise", - text: "Key contact", - ) : "" %> + <% if user.is_data_protection_officer? %> + <%= govuk_tag( + classes: "app-tag--small", + colour: "turquoise", + text: "Data protection officer", + ) %> + <% else %> + <%= "" %> + <% end %> + <% if user.is_key_contact? %> + <%= govuk_tag( + classes: "app-tag--small", + colour: "turquoise", + text: "Key contact", + ) %> + <% else %> + <%= "" %> + <% end %> <% end %> <% row.cell(text: simple_format(org_cell(user), {}, wrapper_tag: "div")) %> <% row.cell(text: user.active? ? user.last_sign_in_at&.to_formatted_s(:govuk_date) : "Deactivated") %>