search for: create_from_csv_array

Displaying 1 result from an estimated 1 matches for "create_from_csv_array".

2006 Jul 28
1
How do I get an original file name from an upload using file_field?
...e file name get returned as some random temp file name... there has to be an easy way to do this. Thanks for any help. This is what I currently have... In the controller: def upload ... file_contents = params[:document][:file] FasterCSV.parse(file_contents) do |row| result = Source.create_from_csv_array(row) logger.error(result.inspect) if result.kind_of?(Exception) end redirect_to :action => ''update_charges'' end In the view: <h2>Import CSV file</h2> <%= start_form_tag( { :action => ''upload'' }, { :multipart => true } ) %...