From 7ca56ee02903670ce15b894dcf748f1f3909366a Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 6 Feb 2024 11:54:21 -0500 Subject: [PATCH] Use single-line unless --- app/models/forms/export.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/models/forms/export.rb b/app/models/forms/export.rb index 6a5caff5da..9a0074932f 100644 --- a/app/models/forms/export.rb +++ b/app/models/forms/export.rb @@ -125,9 +125,7 @@ def to_xls constraints_to_push += "(#{conditions_to_xls(c.conditions, c.accept_if)})" # add "and" unless we're at the end - unless c_index + 1 == q.constraints.length - constraints_to_push += " and " - end + constraints_to_push += " and " unless c_index + 1 == q.constraints.length end # if we have an option set, identify and save it so that we can add it to the choices sheet later.