Sha256: d334218c8cc8829d0a9ab0c5c66d9576f37952d780ee215a3795cb6899668a4d
Contents?: true
Size: 575 Bytes
Versions: 6
Compression:
Stored size: 575 Bytes
Contents
# simple_csv_reader Simple CSV reader. ## Installation Add this line to your application's Gemfile: ```ruby gem 'simple_csv_reader' ``` And then execute: $ bundle install Or install it yourself as: $ gem install simple_csv_reader ## Usage ```ruby # csv_file content # # Name,Email Address # tester1,tester1@csv.test # tester2,tester2@csv.test HEADERS = { name: 'Name', email: 'Email Address', }.freeze def import SimpleCsvReader.read(csv_file.path, HEADERS) do |row, row_number:| User.create!(name: row[:name], email: row[:email]) end end ```
Version data entries
6 entries across 6 versions & 1 rubygems