Commit 3364e78398c62c55701b6dea5a7294c05ca0eb2f
1 parent
e4eebdf7
Exists in
staging
and in
3 other branches
comment_group: force quotes when exporting comments
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
plugins/comment_group/lib/comment_group_plugin/comments_report.rb
1 | +require 'csv' | ||
2 | + | ||
1 | module CommentGroupPlugin::CommentsReport | 3 | module CommentGroupPlugin::CommentsReport |
2 | 4 | ||
3 | #FIXME make this test | 5 | #FIXME make this test |
@@ -27,7 +29,7 @@ module CommentGroupPlugin::CommentsReport | @@ -27,7 +29,7 @@ module CommentGroupPlugin::CommentsReport | ||
27 | return _("No comments for article[%{id}]: %{path}\n\n") % {:id => article.id, :path => article.path} if @export.empty? | 29 | return _("No comments for article[%{id}]: %{path}\n\n") % {:id => article.id, :path => article.path} if @export.empty? |
28 | 30 | ||
29 | column_names = @export.first.keys | 31 | column_names = @export.first.keys |
30 | - CSV.generate do |csv| | 32 | + CSV.generate(force_quotes: true) do |csv| |
31 | csv << column_names | 33 | csv << column_names |
32 | @export.each { |x| csv << x.values } | 34 | @export.each { |x| csv << x.values } |
33 | end | 35 | end |