blob: 1fa42cbf4cab0b0f2cfeb15b33e6beea25d07c6c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
class ErrorsController < ApplicationController
def render_error
@exception = env["action_dispatch.exception"]
@status = ActionDispatch::ExceptionWrapper.new(env, @exception).status_code
respond_to do |format|
format.html do
render "error_#{@status}", :status => @status
end
format.json do
render "error_#{@status}", :status => @status
end
end
end
end
|