Class: AhoyCaptain::ExportsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- AhoyCaptain::ExportsController
- Defined in:
- app/controllers/ahoy_captain/exports_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Methods included from Rangeable
Methods included from CompareMode
#compare_mode?, #comparison_mode, included
Instance Method Details
#show ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'app/controllers/ahoy_captain/exports_controller.rb', line 5 def show export = Export.new(params, self).build file = export.to_zip send_data file.read, type: 'application/zip', disposition: 'attachment', filename: "AhoyCaptain export #{request.host} #{range[0].to_date} to #{(range[1] || Time.current).to_date}.zip" end |