1 changed files with 2 additions and 2 deletions
@ -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…
Reference in new issue