Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a gem for mapping and importing data into a rails web application from a web interface?

If you've ever imported a subscriber list to MailChimp you know exactly what I am looking for.

  1. User uploads a .csv, .xls, .xlsx, .txt file.
  2. Application matches column headers to model.
  3. User is able to edit matched columns and select matches for those columns that are not automatically matched.
  4. Application validates and imports rows.
  5. (Optional) user is given interface to correct errors (e.g. string in a number field).
  6. Application exports error rows so user can correct and re-import.

I'm looking for a gem or tutorial to give me a head start but haven't had much success. This seems like a common requirement, there must be something out there.

like image 604
Kyle West Avatar asked Oct 25 '12 19:10

Kyle West


1 Answers

Garden variety of gems that may point you in the right direction can be found in the Ruby Toolbox. Conformist (current) and CSV Importer (getting dated) are headed in the right direction.

like image 170
RyanFarmer Avatar answered Oct 25 '22 18:10

RyanFarmer