Class: ThinkFeelDoDashboard::ReportsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- ThinkFeelDoDashboard::ReportsController
- Defined in:
- app/controllers/think_feel_do_dashboard/reports_controller.rb
Overview
Provide access to data exports.
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
8 9 10 11 |
# File 'app/controllers/think_feel_do_dashboard/reports_controller.rb', line 8 def index :read, "Reports" fetch_reports end |
#show ⇒ Object
13 14 15 16 17 18 |
# File 'app/controllers/think_feel_do_dashboard/reports_controller.rb', line 13 def show :read, "Reports" file_path = reporter.file_path(params[:id]) || {} respond_to { |fmt| fmt.csv { send_file file_path, type: "text/csv" } } end |