Class: Cms::PortletController

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

Instance Method Summary collapse

Methods included from PageHelper

#able_to?, #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

#execute_handlerObject



6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/cms/portlet_controller.rb', line 6

def execute_handler
  @portlet = Portlet.find(params[:id])
  @portlet.controller = self

   method = params[:handler]
   if @portlet.class.superclass.method_defined?(method) or @portlet.class.private_method_defined?(method) or @portlet.class.protected_method_defined?(method)
     raise Cms::Errors::AccessDenied
   else
     redirect_to @portlet.send(method)
   end

end