Importing Data
By default, the interface allows us to create records one by one. This can is inefficient if we have a lot of data that we need to save or we want to use data from another application. It ' s possible to enable CSV importation in the application.
We ll use the active_admin_importable gem for this. In your Gemfile add:
Gem ' active_admin_importable '
And then execute bundle install.
To enable CSV import on the Author page, in app/admin/author.rb add the following.
Active_admin_importable
An Import Authors button would have appeared at the top right corner of the page. Click on it and browse your local file system for the CSV file with want to import. The file should have a header row corresponding with your model attributes. You don ' t have to include all columns, as default values would be inserted for columns your leave out.
I created a CSV file with the following two records and imported it.
The Name,last name
Jane,doe
John,doe
Turn from: http://www.sitepoint.com/easy-admin-interfaces-active-admin-rails/