Sha256: 4d3479af56163c7522bd53ffe554f2dfd024b2c39ce3fb69e87ff745ed109e9f

Contents?: true

Size: 242 Bytes

Versions: 31

Compression:

Stored size: 242 Bytes

Contents

# frozen_string_literal: true

# Keppler
module Uploadable
  extend ActiveSupport::Concern
  included do
    require 'csv'

    def self.upload(file)
      CSV.foreach(file.path, headers: true) { |row| create! row.to_hash }
    end
  end
end

Version data entries

31 entries across 30 versions & 1 rubygems

Version Path
keppler-2.1.22 installer/core/app/models/concerns/uploadable.rb
keppler-2.1.21 installer/core/app/models/concerns/uploadable.rb
keppler-2.1.20 installer/core/app/models/concerns/uploadable.rb
keppler-2.1.19 installer/core/app/models/concerns/uploadable.rb
keppler-2.1.18 installer/core/app/models/concerns/uploadable.rb
keppler-2.1.18 testing-with-2.1.18/app/models/concerns/uploadable.rb
keppler-2.1.17 installer/core/app/models/concerns/uploadable.rb
keppler-2.1.16 installer/core/app/models/concerns/uploadable.rb
keppler-2.1.15 installer/core/app/models/concerns/uploadable.rb
keppler-2.1.14 installer/core/app/models/concerns/uploadable.rb
keppler-2.1.13 installer/core/app/models/concerns/uploadable.rb
keppler-2.1.12 installer/core/app/models/concerns/uploadable.rb
keppler-2.1.11 installer/core/app/models/concerns/uploadable.rb
keppler-2.1.10 installer/core/app/models/concerns/uploadable.rb
keppler-2.1.9 installer/core/app/models/concerns/uploadable.rb
keppler-2.1.8 installer/core/app/models/concerns/uploadable.rb
keppler-2.1.7 installer/core/app/models/concerns/uploadable.rb
keppler-2.1.6 installer/core/app/models/concerns/uploadable.rb
keppler-2.1.5 installer/core/app/models/concerns/uploadable.rb
keppler-2.1.4 installer/core/app/models/concerns/uploadable.rb