We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e67e7c3 commit bfc2027Copy full SHA for bfc2027
app/controllers/stories_controller.rb
@@ -103,9 +103,7 @@ def export
103
104
def generate_csv(stories, with_comments: false, export_all: false)
105
CSV.generate(headers: true) do |csv|
106
- headers = CSV_HEADERS.dup
107
- headers << "comment" if with_comments
108
- csv << headers
+ csv << CSV_HEADERS.dup.tap { |headers| headers << "comment" if with_comments }
109
110
stories.by_position.each do |story|
111
if with_comments
0 commit comments