From 3e7d52f7e3666c81299cfe6c060bdc2ae38c6825 Mon Sep 17 00:00:00 2001 From: David Czulada Date: Mon, 24 Jul 2023 09:14:47 -0400 Subject: [PATCH] pass in format when printing c1 and c4 criteria --- app/controllers/products_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/products_controller.rb b/app/controllers/products_controller.rb index e8f82446c..4a74f83d1 100644 --- a/app/controllers/products_controller.rb +++ b/app/controllers/products_controller.rb @@ -199,8 +199,8 @@ def supplemental_test_artifact def patients crit_exists = !@product.product_tests.checklist_tests.empty? filt_exists = !@product.product_tests.filtering_tests.empty? - criteria_list = crit_exists ? render_to_string(template: 'checklist_tests/print_criteria', layout: 'report') : nil - filtering_list = filt_exists ? render_to_string(template: 'checklist_tests/print_filtering', layout: 'report') : nil + criteria_list = crit_exists ? render_to_string(template: 'checklist_tests/print_criteria', layout: 'report', formats: :html) : nil + filtering_list = filt_exists ? render_to_string(template: 'checklist_tests/print_filtering', layout: 'report', formats: :html) : nil file = Cypress::CreateTotalTestZip.create_total_test_zip(@product, criteria_list, filtering_list, 'qrda') send_data file.read, type: 'application/zip', disposition: 'attachment', filename: "#{@product.name}_#{@product.id}.zip".tr(' ', '_') end