Method: Export::WebContentsController#all

Defined in:
app/controllers/pwb/export/web_contents_controller.rb

#allObject



4
5
6
7
8
9
10
11
12
13
# File 'app/controllers/pwb/export/web_contents_controller.rb', line 4

def all
  # TODO: - figure out how to get associated cols like raw_en

  headers['Content-Disposition'] = "attachment; filename=\"pwb-web-contents.csv\""
  headers['Content-Type'] ||= 'text/csv'
  # send_data text: (Content.to_csv ["key", "tag", "status", "sort_order", "raw"])
  # above results in below message in chrome:
  # Resource interpreted as Document but transferred with MIME type application/octet-stream
  render plain: (Content.to_csv ["key", "tag", "status", "sort_order", "raw"])
end