Class: ErrorsController
Instance Attribute Summary
#current_user
Instance Method Summary
collapse
#disable_static_cache!
#policy, #verify_policy, #verify_policy_with_proc
inc_number_of_requests, original_title
#render_error
#authenticate!, #deauthenticate!, #logged_in?
Instance Method Details
#forbidden ⇒ Object
10
11
12
|
# File 'app/controllers/errors_controller.rb', line 10
def forbidden
render_error 403
end
|
#internal_error ⇒ Object
26
27
28
29
30
31
32
33
34
|
# File 'app/controllers/errors_controller.rb', line 26
def internal_error
exception = request.env["action_dispatch.exception"]
if exception
wrapper = ActionDispatch::ExceptionWrapper.new(nil, exception)
render_error wrapper.status_code
else
render_error 500
end
end
|
#not_found ⇒ Object
14
15
16
|
# File 'app/controllers/errors_controller.rb', line 14
def not_found
render_error 404
end
|
#show ⇒ Object
6
7
8
|
# File 'app/controllers/errors_controller.rb', line 6
def show
render_error params[:id].to_i
end
|
#unacceptable ⇒ Object
18
19
20
|
# File 'app/controllers/errors_controller.rb', line 18
def unacceptable
render_error 422
end
|
#unauthorized ⇒ Object
22
23
24
|
# File 'app/controllers/errors_controller.rb', line 22
def unauthorized
render_error 401
end
|