Class: Cms::ContentController

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

Instance Method Summary collapse

Methods included from PageHelper

#cms_toolbar, #container, #container_has_block?, #current_page, #page_title, #render_breadcrumbs, #render_portlet

Methods included from PathHelper

#cms_connectable_path, #cms_index_path_for, #cms_index_url_for, #cms_new_path_for, #cms_new_url_for, #edit_cms_connectable_path

Methods included from ErrorHandling

#handle_access_denied, #handle_server_error, included

Instance Method Details

#handle_access_denied_on_page(exception) ⇒ Object



31
32
33
34
# File 'app/controllers/cms/content_controller.rb', line 31

def handle_access_denied_on_page(exception)
  logger.warn "Access Denied"
  handle_error_with_cms_page('/system/access_denied', exception, :forbidden)
end

#handle_not_found_on_page(exception) ⇒ Object

—– Error Handlers ——————————————————-



26
27
28
29
# File 'app/controllers/cms/content_controller.rb', line 26

def handle_not_found_on_page(exception)
  logger.warn "Page Not Found"
  handle_error_with_cms_page('/system/not_found', exception, :not_found)
end

#handle_server_error_on_page(exception) ⇒ Object



36
37
38
39
40
# File 'app/controllers/cms/content_controller.rb', line 36

def handle_server_error_on_page(exception)
  logger.warn "Exception: #{exception.message}\n"
  logger.warn "#{exception.backtrace.join("\n")}\n"
  handle_error_with_cms_page('/system/server_error', exception, :internal_server_error)
end

#instance_variables_for_renderingObject

Used by the rendering behavior



43
44
45
# File 'app/controllers/cms/content_controller.rb', line 43

def instance_variables_for_rendering
  instance_variables - (@initial_ivars || []) - ["@initial_ivars"]
end

#showObject

—– Actions ————————————————————–



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

def show
  render_page_with_caching
end

#show_page_routeObject



20
21
22
# File 'app/controllers/cms/content_controller.rb', line 20

def show_page_route
  render_page_with_caching
end