[Awesome Ruby Gem] Use active_importer gem to load tabular data from spreadsheets or CSV files into any ActiveRecord-like ORM
active_importer
active_importer
allows you to define importers that load tabular data from spreadsheets or CSV files into any ActiveRecord-like ORM.
Installation
You can install it as a gem:
1 | gem install active_importer |
or add it into a Gemfile (Bundler):
1 | # Gemfile |
Usages
Importers are classes that you can instruct on how to import data into data models.
1 | # app/imports/employee_import.rb |
Once defined, importers can be invoked to import a given data file.
1 | EmployeeImporter.import('file.xls', params: { owner_id: @user.id }) |
See Home · continuum/active_importer Wiki - https://github.com/continuum/active_importer/wiki to learn more.
References
[2] Active Importer by continuum - http://continuum.github.io/active_importer/
[4] Home · continuum/active_importer Wiki - https://github.com/continuum/active_importer/wiki