Skip to content

Commit

Permalink
Fixes deprecation warning with rendering partial
Browse files Browse the repository at this point in the history
```
DEPRECATION WARNING: Rendering actions with '.' in the name is
deprecated: layouts/_flash_messages.htm
l.erb
```
  • Loading branch information
scottolsen committed Dec 22, 2020
1 parent 3ea6548 commit 5a959b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/case_court_reports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5a959b0

Please sign in to comment.