From 862b0d81a86ffa401287eafada7349c0b1ed5fed Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Fri, 2 Aug 2024 16:54:45 +0100 Subject: [PATCH] Fix lint offences --- app/components/bulk_upload_error_row_component.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/bulk_upload_error_row_component.html.erb b/app/components/bulk_upload_error_row_component.html.erb index e4f77b975..2eb7d6ecb 100644 --- a/app/components/bulk_upload_error_row_component.html.erb +++ b/app/components/bulk_upload_error_row_component.html.erb @@ -20,7 +20,7 @@ <% end %> <%= table.with_body do |body| %> - <% bulk_upload_errors.select { |error| error.category != "soft_validation" }.each do |error| %> + <% bulk_upload_errors.reject { |error| error.category == "soft_validation" }.each do |error| %> <% body.with_row do |row| %> <% row.with_cell(text: error.cell) %> <% row.with_cell(text: question_for_field(error.field)) %> @@ -50,7 +50,7 @@ <% potential_errors.group_by(&:error).each do |error_message, errors| %> <% errors.each_with_index do |error, index| %> <% row_class = "grouped-rows" %> - <% row_class += " first-row" if index == 0 %> + <% row_class += " first-row" if index.zero? %> <% row_class += " last-row" if index == errors.size - 1 %> <% body.with_row(html_attributes: { class: row_class }) do |row| %> <% row.with_cell(text: error.cell) %>