Browse Source

Fix lint offence

pull/2605/head
Manny Dinssa 2 years ago
parent
commit
f85f4ea319
  1. 4
      app/helpers/deactivate_confirm_helper.rb

4
app/helpers/deactivate_confirm_helper.rb

@ -1,8 +1,8 @@
module DeactivateConfirmHelper
def affected_title(affected_logs, affected_locations)
title_parts = []
title_parts << pluralize(affected_logs.count, "log") if affected_logs.count > 0
title_parts << pluralize(affected_locations.count, "location") if affected_locations.count > 0
title_parts << pluralize(affected_logs.count, "log") if affected_logs.count.positive?
title_parts << pluralize(affected_locations.count, "location") if affected_locations.count.positive?
"This change will affect #{title_parts.join(' and ')}."
end
end

Loading…
Cancel
Save