Class: Decidim::ActionDelegator::DelegationsCsvImporter

Inherits:
CsvImporter
  • Object
show all
Defined in:
app/services/decidim/action_delegator/delegations_csv_importer.rb

Instance Method Summary collapse

Methods inherited from CsvImporter

#generate_info_message, #handle_import_error, #handle_skipped_row, #headers, #import!, #initialize, #invalid_email?

Constructor Details

This class inherits a constructor from Decidim::ActionDelegator::CsvImporter

Instance Method Details

#process(row, params, details_csv, import_summary, iterator) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'app/services/decidim/action_delegator/delegations_csv_importer.rb', line 6

def process(row, params, details_csv, import_summary, iterator)
  if delegation_exists?(params)
    message = generate_info_message(row)

    handle_skipped_row(row, details_csv, import_summary, iterator, message)

    false
  else
    true
  end
end