mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 20:15:22 +02:00
Refactor: Allow other import files (#1099)
* Rename stimulus controller * feature: rename raw_csv_str to raw_file_str
This commit is contained in:
parent
e6528bafec
commit
0c1ff00c1e
16 changed files with 71 additions and 57 deletions
|
@ -11,8 +11,8 @@ class Import::Csv
|
|||
)
|
||||
end
|
||||
|
||||
def self.create_with_field_mappings(raw_csv_str, fields, field_mappings, col_sep = DEFAULT_COL_SEP)
|
||||
raw_csv = self.parse_csv(raw_csv_str, col_sep:)
|
||||
def self.create_with_field_mappings(raw_file_str, fields, field_mappings, col_sep = DEFAULT_COL_SEP)
|
||||
raw_csv = self.parse_csv(raw_file_str, col_sep:)
|
||||
|
||||
generated_csv_str = CSV.generate headers: fields.map { |f| f.key }, write_headers: true, col_sep: do |csv|
|
||||
raw_csv.each do |row|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue