A simple csv import function to my Rails application

Hi.

I am in the process of making an application that should handle imports of the content csv. I plan on incorporating AJAX when I get more routine (so the page don't have to redirect back after the upload), but for now I am looking for the simplest upload function. A file could for example be (First_name;Last_name;Age;State):

Andrew;McDonald;78;California

I am quite new to Rails, so nothing fancy. Preferably some basic code in View, Controller and Model.

My sqlite3 database has a table that contains the corresponding columns.

Hi.

I am in the process of making an application that should handle imports of the content csv. I plan on incorporating AJAX when I get more routine (so the page don't have to redirect back after the upload), but for now I am looking for the simplest upload function. A file could for example be (First_name;Last_name;Age;State):

Andrew;McDonald;78;California

I am quite new to Rails, so nothing fancy. Preferably some basic code in View, Controller and Model.

My sqlite3 database has a table that contains the corresponding columns.

Which bit do you need help with, the upload or parsing the data? If the upload have you tried googling for rails upload?

Colin

Colin Law wrote in post #1063851:

Have you added

**require** 'csv'

?