You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a forbidden controller action that renders a page with a 403 response code.
defforbidden(exception)@error_presenter=ErrorPresenter.new(status_code: :forbidden)# ...respond_todo |format|
format.html{render(:base_error,status: :forbidden)}# this is the line in questionformat.all{head(:forbidden)}endend
Issue
When navigating from another page in my app to this forbidden page, the page renders without a layout and there are a series of JS errors related to double loading.
(no formatting or layout)
Workarounds
There is no issue when,
Removing import "@hotwired/turbo-rails"; in my JS pack file
Removing status: :forbidden from the render call
Neither of these workarounds are acceptable long term.
The text was updated successfully, but these errors were encountered:
Context
Rails 7.0.2.4
Ruby 3.1.2
turbo-rails 1.1.1
I have a
forbidden
controller action that renders a page with a 403 response code.Issue
When navigating from another page in my app to this forbidden page, the page renders without a layout and there are a series of JS errors related to double loading.
(no formatting or layout)
Workarounds
There is no issue when,
import "@hotwired/turbo-rails";
in my JS pack filestatus: :forbidden
from therender
callNeither of these workarounds are acceptable long term.
The text was updated successfully, but these errors were encountered: