Skip to content

Commit 097372c

Browse files
authored
Merge pull request #3482 from DMPRoadmap/aaron/issues/3414
Add pdf handling in `render_respond_to_format_with_error_message`
2 parents 6a49bd6 + 65253e0 commit 097372c

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Fixed bar chart click function in the Usage dashboard (GitHub issue #3443)
66
- Fixed broken link for the V1 API documentation.
77
- Fix `hidden_field_tag` Nested Attributes Format For Rails 7 Upgrade and Add Test Coverage [#3479](https://github.com/DMPRoadmap/roadmap/pull/3479)
8+
- Add pdf handling in `render_respond_to_format_with_error_message` [#3482](https://github.com/DMPRoadmap/roadmap/pull/3482)
89
- 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)
910

1011
**Note this upgrade is mainly a migration from Bootstrap 3 to Bootstrap 5.**

app/controllers/application_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def render_respond_to_format_with_error_message(msg, url_or_path, http_status, e
188188

189189
respond_to do |format|
190190
# Redirect use to the path and display the error message
191-
format.html { redirect_to url_or_path, alert: msg }
191+
format.any(:html, :pdf) { redirect_to url_or_path, alert: msg }
192192
# Render the JSON error message (using API V1)
193193
format.json do
194194
@payload = { errors: [msg] }

0 commit comments

Comments
 (0)