Class: Panda::CMS::ErrorsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/panda/cms/errors_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#add_breadcrumb, #authenticate_admin_user!, #authenticate_user!, #breadcrumbs, #current_user, #set_current_request_details, #user_signed_in?

Methods included from ApplicationHelper

#active_link?, #block_link_to, #component, #level_indent, #menu_indent, #nav_class, #nav_highlight_colour_classes, #panda_cms_editor, #panda_cms_form_with, #selected_nav_highlight_colour_classes, #table_indent, #title_tag

Instance Method Details

#error_503Object



16
17
18
# File 'app/controllers/panda/cms/errors_controller.rb', line 16

def error_503
  render view_for_code(503), status: 503
end

#showObject



8
9
10
11
12
13
14
# File 'app/controllers/panda/cms/errors_controller.rb', line 8

def show
  exception = request.env["action_dispatch.exception"]
  status_code = exception.try(:status_code) || ActionDispatch::ExceptionWrapper.new(request.env,
    exception).status_code

  render view_for_code(status_code), status: status_code
end