Skip to content

Commit

Permalink
fix csv export option handling
Browse files Browse the repository at this point in the history
  • Loading branch information
wvengen committed May 13, 2014
1 parent 724ce6f commit 0afe8bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/render_csv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ def initialize(object, options={})
end

def to_csv
CSV.generate @options do |csv|
options = @options.select {|k| %w(col_sep row_sep encoding).include? k.to_s}
CSV.generate options do |csv|
if h = header
csv << h
end
Expand Down

0 comments on commit 0afe8bb

Please sign in to comment.