Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread
Message: 90473
BY: James Gray (bbazzarrakk)
DATE: 2009-09-23 14:51
SUBJECT: RE: gem update and now I have a column name e

 

I'm glad to hear you sorted out your issue.

Just FYI, you can simplify this:

FCSV.new(file, :headers => true).each do |row|
# ...
end

to this:

FCSV.foreach(file, :headers => true) do |row|
# ...
end

Using foreach() is a little better since it will close the underlying IO object after you have seen all of the rows.


Thread View

Thread Author Date
gem update and now I have a column name errorDemetrius Olsen2009-09-23 05:15
      RE: gem update and now I have a column name errorDemetrius Olsen2009-09-23 05:31
      RE: gem update and now I have a column name eJames Gray2009-09-23 14:51

Post a followup to this message