Created
July 9, 2025 21:48
-
-
Save camertron/de68a79f7785ceaf5e70d78ea0447a95 to your computer and use it in GitHub Desktop.
Override Rails template error page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.after_initialize do | |
ActionDispatch::ExceptionWrapper.rescue_templates["ActionView::Template::Error"] = "rux_template_error" | |
ActionDispatch::DebugView::RESCUES_TEMPLATE_PATHS.unshift(Rails.root.join("app", "views", "ext")) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Then define app/views/ext/rescues/rux_template_error.html.erb, which can render the original template like so: