Skip to content

Commit

Permalink
changed csv library to fastercsv, compatible with ruby 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
arydjmal committed Jul 29, 2008
1 parent bb6a96c commit 151034e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion init.rb
@@ -1,2 +1,2 @@
require 'CSV'
require 'fastercsv'
require 'to_csv'
2 changes: 1 addition & 1 deletion lib/to_csv.rb
Expand Up @@ -10,7 +10,7 @@ def to_csv(options = {})
columns -= [:id] unless options[:id] == true
end

CSV::Writer.generate(output = "") do |csv|
output = FasterCSV.generate do |csv|
csv << columns.collect {|c| c} unless options[:header] == false
self.each do |item|
csv << columns.collect {|c| item.send(c)}
Expand Down

0 comments on commit 151034e

Please sign in to comment.