Class: Burp::CatchAllController

Inherits:
ApplicationController show all
Defined in:
app/controllers/burp/catch_all_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#init_body_classes, #menu, #set_site_name

Instance Method Details

#cms_pageObject



19
20
21
# File 'app/controllers/burp/catch_all_controller.rb', line 19

def cms_page
  @cms_page
end

#showObject

Raises:

  • (ActionController::RoutingError)


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

def show
  @menu = Burp::Menu.find("main")
  @burp_page_path = params[:burp_page_path] || request.path
  @cms_page = Burp.find_page(@burp_page_path)
  
  @access = self.respond_to?(:access) ? self.access : Burp.new_access_instance(request, self)
  @access.may_view_page!(@cms_page)

  raise ActionController::RoutingError.new('Page not Found') if @cms_page.nil?

  render :text => @cms_page[:main], :layout => "application"
end