Class: PagesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
lib/generators/pixelforce_cms/templates/pages_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



3
4
5
6
7
8
9
10
# File 'lib/generators/pixelforce_cms/templates/pages_controller.rb', line 3

def show
  @page = Page.find params[:id]
  if @page.nil?
    redirect_to root_path
    return
  end
  render params[:id].underscore if lookup_context.template_exists?(params[:id].underscore, "pages", false)
end