a11yist/app/controllers/exports_controller.rb

27 lines
645 B
Ruby
Raw Normal View History

2024-11-11 20:19:52 +01:00
# 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