Hi, I am doing a finctionality to import csv file. My CSV file is like this Header-- Name,Address,Details Data-- Tushar, sangavi,pune, I am a ror developer
My controller code is:- @parsed_file=CSV::Reader.parse(params[:dump][:file]) @parsed_file.each do |row| p row[1] p row[2] end
My problem is if you looked at it that address is "sangavi,pune". But whenever I am printing the row values. I am getting row[1] as "sangavi" and row[2] as "pune", which is not correct, Can anyoneone tell me how should I solve this problem?