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 #3417

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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] }
Expand Down
Loading