Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread
Message: 58524
BY: James Gray (bbazzarrakk)
DATE: 2008-07-14 12:56
SUBJECT: RE: Get 'nil' when use :headers => true option

 

Once headers are activated, FasterCSV no longer returns Arrays. Instead it returns FasterCSV::Row objects.

You could get your example to work with something like:

type, time, payee amount = row.fields

Must better thought would be to just use the headers. That's why you told FasterCSV to read them after all.

puts row["payee"] # or whatever the column name is

Hope that helps.

James Edward Gray II


Thread View

Thread Author Date
Get 'nil' when use :headers => true optionD C2008-07-11 18:27
      RE: Get 'nil' when use :headers => true optionJames Gray2008-07-14 12:56

Post a followup to this message