Sha256: f52d459c9c3f487f7d2b7bc3fb85c6d342248ac0f5bf37052968311fa7390d1a
Contents?: true
Size: 676 Bytes
Versions: 3
Compression:
Stored size: 676 Bytes
Contents
module Pwb class Export::WebContentsController < ApplicationApiController # http://localhost:3000/export/web_contents/all 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 end end
Version data entries
3 entries across 3 versions & 1 rubygems