First step of online html export
This commit is contained in:
parent
d2165a484c
commit
5e0539d7c6
7 changed files with 264 additions and 16 deletions
26
app/controllers/exports_controller.rb
Normal file
26
app/controllers/exports_controller.rb
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# frozen_string_literals: true
|
||||
|
||||
class ExportsController < ApplicationController
|
||||
layout "exports"
|
||||
|
||||
allow_unauthenticated_access only: [ :show ]
|
||||
|
||||
before_action :set_report
|
||||
|
||||
def show
|
||||
@failed_success_criteria = @report.pages
|
||||
.map(&:elements)
|
||||
.flatten
|
||||
.map(&:success_criteria)
|
||||
.flatten
|
||||
.select(&:failed?)
|
||||
respond_to do |format|
|
||||
format.html
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def set_report
|
||||
@report = Report.find(params[:report_id])
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue