Displaying 1 result from an estimated 1 matches for "trans_action".
2006 Mar 21
8
Loading the contents of a CSV file to a database
...ully
listed the contents of the csv file. I thought it would be a simple step
to loop through the file and insert the values in to the db. In addition
to the generated admin_controller.rb file containing list, update etc i
put
def csv_preview
require ''faster_csv''
@csv_trans_action = FasterCSV.read("c:/nugget/statement.csv")
end
def csv_load
require ''faster_csv''
@csv_trans_actions = FasterCSV.read("c:/nugget/statement.csv")
for trans_action in @trans_actions
for csv_trans_action in @csv_trans_actions
trans...