diff --git a/CHANGELOG.md b/CHANGELOG.md index edd0fea745..06c47a6a16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Fixed bar chart click function in the Usage dashboard (GitHub issue #3443) - Fixed broken link for the V1 API documentation. - Fix `hidden_field_tag` Nested Attributes Format For Rails 7 Upgrade and Add Test Coverage [#3479](https://github.com/DMPRoadmap/roadmap/pull/3479) +- Add pdf handling in `render_respond_to_format_with_error_message` [#3482](https://github.com/DMPRoadmap/roadmap/pull/3482) - Lower PostgreSQL GitHub Action Chrome Version to Address Breaking Changes Between Latest Chrome Version (134) and `/features` Tests [#3491](https://github.com/DMPRoadmap/roadmap/pull/3491) **Note this upgrade is mainly a migration from Bootstrap 3 to Bootstrap 5.** diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 71499ae5fa..0518a79d69 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -188,7 +188,7 @@ def render_respond_to_format_with_error_message(msg, url_or_path, http_status, e respond_to do |format| # Redirect use to the path and display the error message - format.html { redirect_to url_or_path, alert: msg } + format.any(:html, :pdf) { redirect_to url_or_path, alert: msg } # Render the JSON error message (using API V1) format.json do @payload = { errors: [msg] }