Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pdf handling in render_respond_to_format_with_error_message #731

Merged
merged 2 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- Enable Translation of QuestionOption.text (and Refactor Translation of ResearchDomain.label) [#742](https://github.com/portagenetwork/roadmap/pull/742)

### Fixed

- Add .pdf handling in render_respond_to_format_with_error_message [#731](https://github.com/portagenetwork/roadmap/pull/731)

### Changed

- Deactivate Requests to External ROR API [#738](https://github.com/portagenetwork/roadmap/pull/738)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,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] }
Expand Down
Loading