Skip to content

Commit 9ac95e6

Browse files
committed
clean up the patch for selecting clear or not clear leads on upload
1 parent 3bdf0a1 commit 9ac95e6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/tiny_dialer/csv_scrub.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ module TinyDialer
66
class CsvScrubber
77
attr_reader :path, :db, :records, :clear_leads
88

9-
def initialize(path, clear_leads)
9+
def initialize(path, clear_leads = false)
1010
@path = path
1111
@db = TinyDialer.db
12-
@clear_leads = clear_leads.to_i || 0
12+
@clear_leads = clear_leads
1313
end
1414

1515
def read_csv
@@ -33,7 +33,7 @@ def clear_previous_leads
3333
end
3434

3535
def scrub_csv
36-
if clear_leads == 1
36+
if clear_leads
3737
clear_previous_leads
3838
end
3939
read_csv

0 commit comments

Comments
 (0)