Sha256: 03f2760f9371e964b64ee0d355c1adb8fc82a819526eca15c373fd854be4299a

Contents?: true

Size: 490 Bytes

Versions: 48

Compression:

Stored size: 490 Bytes

Contents

module CsvImporters
  class <%= klass %>Importer < Effective::CsvImporter
    def columns
      {<% columns.each_with_index do |column, index| %>
        <%= column.to_s.underscore.tap { |name| [' ', '/', '(', ')', '__'].each { |str| name.gsub!(str, '_') } }.to_sym %>: <%= (letters[index] || index) %><%= ',' unless (index+1) == columns.length %><% end %>
      }
    end

    def process_row
      # assign_columns(<%= klass.singularize %>.new).save!
      raise 'todo'
    end
  end
end

Version data entries

48 entries across 46 versions & 1 rubygems

Version Path
effective_developer-0.5.0 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.4.16 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.4.15 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.4.14 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.4.13 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.4.12 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.4.11 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.4.10 lib/scaffolds/importers/csv_importer.rb