aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorZakaria BOUZIANE2014-11-17 14:24:56 +0100
committerZakaria BOUZIANE2014-11-17 14:24:56 +0100
commit252c0caef2d9efb7d18c59653e1cd4453b9435b1 (patch)
treedea0930d38252bffa596ba8c4384bd6f6d3be453 /app/controllers
parent68408c39a958e3706342fbbbdb701e0609eefb8b (diff)
downloadchouette-core-252c0caef2d9efb7d18c59653e1cd4453b9435b1.tar.bz2
Compliance check report in CSV file
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/compliance_check_results_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/compliance_check_results_controller.rb b/app/controllers/compliance_check_results_controller.rb
index a4ef40509..85ba23e38 100644
--- a/app/controllers/compliance_check_results_controller.rb
+++ b/app/controllers/compliance_check_results_controller.rb
@@ -1,11 +1,14 @@
class ComplianceCheckResultsController < ChouetteController
+
respond_to :json
respond_to :js, :only => :index
+ respond_to :csv, :only => :index
belongs_to :compliance_check_task
- def index
+ def index
index! do |format|
format.html { render :layout => false }
+ format.csv { send_file collection[0].compliance_check_task.file, :type => "text/html; charset=utf-8" }
end
end