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.8.5 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.8.4 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.8.3 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.8.2 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.8.1 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.8.0 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.7.8 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.7.7 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.7.6 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.7.5 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.7.4 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.7.3 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.7.2 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.7.1 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.7.0 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.6.17 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.6.16 lib/scaffolds/importers/csv_importer.rb
effective_developer-0.6.15 lib/scaffolds/basic/importers/csv_importer.rb
effective_developer-0.6.15 lib/scaffolds/effective/importers/csv_importer.rb
effective_developer-0.6.15 lib/scaffolds/admin_effective/importers/csv_importer.rb