Skip to content

Commit

Permalink
🎁 remove whitespaces from CSV headers (#816)
Browse files Browse the repository at this point in the history
* 🎁 remove whitespaces from CSV headers

* 🎁 remove whitespaces from CSV headers

* 🧹 remove accidental debugging statement

* 🧹 remove accidental debugging statement

* ♻️ Favoring `header_converters` for CSV to remove blanks

---------

Co-authored-by: Jeremy Friesen <jeremy.n.friesen@gmail.com>
  • Loading branch information
ShanaLMoore and jeremyf committed Jun 26, 2023
1 parent ae05be9 commit 858f472
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/bulkrax/csv_entry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def self.read_data(path)
raise StandardError, 'CSV path empty' if path.blank?
options = {
headers: true,
header_converters: ->(h) { h.to_sym },
header_converters: ->(h) { h.to_s.strip.to_sym },
encoding: 'utf-8'
}.merge(csv_read_data_options)

Expand Down

0 comments on commit 858f472

Please sign in to comment.