Commit 3907d85f authored by Maxime Orefice's avatar Maxime Orefice Committed by Douglas Barbosa Alexandre

Fix warning deprecation

This commit fixes a warning deprecation in our csv builder.
parent 442a14ef
......@@ -16,6 +16,7 @@
class CsvBuilder
DEFAULT_ORDER_BY = 'id'.freeze
DEFAULT_BATCH_SIZE = 1000
PREFIX_REGEX = /^[=\+\-@;]/.freeze
attr_reader :rows_written
......@@ -114,8 +115,8 @@ class CsvBuilder
def excel_sanitize(line)
return if line.nil?
return line unless line.is_a?(String) && line.match?(PREFIX_REGEX)
line = ["'", line].join if line =~ /^[=\+\-@;]/
line
["'", line].join
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment