From 5a959b0cb5500d1e1b2c80e6a264746b4269798e Mon Sep 17 00:00:00 2001 From: Scott Olsen Date: Tue, 22 Dec 2020 07:04:13 -0600 Subject: [PATCH] Fixes deprecation warning with rendering partial ``` DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated: layouts/_flash_messages.htm l.erb ``` --- app/controllers/case_court_reports_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/case_court_reports_controller.rb b/app/controllers/case_court_reports_controller.rb index 82ba4efc02..6968fc66b4 100644 --- a/app/controllers/case_court_reports_controller.rb +++ b/app/controllers/case_court_reports_controller.rb @@ -38,7 +38,7 @@ def generate render json: {link: case_court_report_path(casa_case.case_number, format: "docx"), status: :ok} else flash[:alert] = "Report #{params[:case_number]} is not found." - error_messages = render_to_string partial: "layouts/flash_messages.html.erb", layout: false, locals: flash + error_messages = render_to_string partial: "layouts/flash_messages", formats: :html, layout: false, locals: flash flash.discard render json: {link: "", status: :not_found, error_messages: error_messages}, status: :not_found