We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 092c3dd commit 8e7f468Copy full SHA for 8e7f468
config/routes.rb
@@ -107,6 +107,11 @@
107
mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.env.development?
108
mount Rambulance::Engine => "/"
109
110
+ Rails.application.routes.draw do
111
+ %w(404 500 422).each do |code|
112
+ match code, to: "errors#show", via: :all, defaults: { status_code: code }
113
+ end
114
+
115
if Rails.env.development? || Rails.env.test?
116
get "/trigger_500", to: ->(env) { raise "Triggering 500 error" }
117
get "/trigger_422", to: "errors#unprocessable_entity"
0 commit comments