Class: Dossier::Responder
- Inherits:
-
ActionController::Responder
- Object
- ActionController::Responder
- Dossier::Responder
- Defined in:
- lib/dossier/responder.rb
Instance Method Summary collapse
Instance Method Details
#respond ⇒ Object
26 27 28 29 |
# File 'lib/dossier/responder.rb', line 26 def respond multi_report_html_only! super end |
#to_csv ⇒ Object
16 17 18 19 |
# File 'lib/dossier/responder.rb', line 16 def to_csv set_content_disposition! controller.response_body = StreamCSV.new(*collection_and_headers(report.raw_results.arrays)) end |
#to_html ⇒ Object
7 8 9 10 |
# File 'lib/dossier/responder.rb', line 7 def to_html report.renderer.engine = controller controller.response_body = report.render end |
#to_json ⇒ Object
12 13 14 |
# File 'lib/dossier/responder.rb', line 12 def to_json controller.render json: report.results.hashes end |