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 a39bdf6 commit a4ce6e1Copy full SHA for a4ce6e1
app/controllers/errors_controller.rb
@@ -0,0 +1,15 @@
1
+class ErrorsController < ApplicationController
2
+ layout 'application' # エラー画面にも通常のアプリと同じレイアウトを適用
3
+
4
+ def not_found
5
+ render status: 404 # このアクションでは app/views/errors/not_found.html.erb が使用されます
6
+ end
7
8
+ def internal_server_error
9
+ render status: 500 # このアクションでは app/views/errors/internal_server_error.html.erb が使用されます
10
11
12
+ def unprocessable_entity
13
+ render status: 422 # このアクションでは app/views/errors/unprocessable_entity.html.erb が使用されます
14
15
+end
0 commit comments