Class: ErrorsController
Instance Attribute Summary
#current_user
Instance Method Summary
collapse
#document_title
#disable_static_cache!, #static_cached?
#policy, #verify_policy, #verify_policy_with_proc
inc_number_of_requests, original_title
#content_locale
#render_error
#authenticate!, #deauthenticate!, #logged_in?
Instance Method Details
#forbidden ⇒ Object
12
13
14
|
# File 'app/controllers/errors_controller.rb', line 12
def forbidden
render_error 403
end
|
#internal_error ⇒ Object
28
29
30
31
32
33
34
35
36
|
# File 'app/controllers/errors_controller.rb', line 28
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
16
17
18
|
# File 'app/controllers/errors_controller.rb', line 16
def not_found
render_error 404
end
|
#show ⇒ Object
8
9
10
|
# File 'app/controllers/errors_controller.rb', line 8
def show
render_error params[:id].to_i
end
|
#unacceptable ⇒ Object
20
21
22
|
# File 'app/controllers/errors_controller.rb', line 20
def unacceptable
render_error 422
end
|
#unauthorized ⇒ Object
24
25
26
|
# File 'app/controllers/errors_controller.rb', line 24
def unauthorized
render_error 401
end
|