Class: Cms::ContentController

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

Instance Method Summary collapse

Instance Method Details

#showObject



3
4
5
6
7
8
9
10
11
12
13
14
# File 'app/controllers/cms/content_controller.rb', line 3

def show
  @page = Page.find_from_path(params[:path])

  if @page
    send @page.template_name if @page
    render :action => @page.template_name
  else
    respond_to do |format|
      format.all { render :file => "#{RAILS_ROOT}/public/404.html", :status => 404  }
    end
  end
end