Skip to content

Active Admin File Importer

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE.txt
MIT
MIT-LICENSE
Notifications You must be signed in to change notification settings

petlove/active_admin_file_importer

An Importer customizable as we use at Petlove.

Table of Contents

Installation

Add this line to your application's Gemfile:

gem 'active_admin_file_importer', github: 'petlove/active_admin_file_importer'
rails generate active_admin_file_importer:install

Types

These are the available types

Confirmation Page

file_import ActiveAdminFileImporter::Types::ConfirmationPage,
            parser: ActiveAdminFileImporter::Parsers::Csv.new(col_sep: ';'), # File parser
            store: ActiveAdminFileImporter::Stores::RailsCache.new, # Method to save parsed data
            processor: ::Payments::Updater::Processor, # Validate and process fields before importation
            importer: ::Payments::Updater::Importer, # Import items
            name: :payments_updater, # Name used to make routes
            label: 'Atualizar Pagamentos', # Label used in Active Admin pages and Link
            admin: :payment # Current admin page. It is used to make route paths and to fetch instructions

You should define a file _instructions.html.erb at /app/views/#{admin}s/#{name}/ to be used as instructions to importation.

Parsers

These are the available parsers

Csv

About

Active Admin File Importer

Topics

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE.txt
MIT
MIT-LICENSE

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published