Skip to content

Commit

Permalink
Use single-line unless
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex committed Feb 6, 2024
1 parent 99f0f47 commit 7ca56ee
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/models/forms/export.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 7ca56ee

Please sign in to comment.