Class: RailsSiteEngine::PagesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/rails_site_engine/pages_controller.rb

Instance Method Summary collapse

Instance Method Details

#show ⇒ Object

Raises:

  • (ActionController::RoutingError)


3
4
5
6
7
8
9
10
# File 'app/controllers/rails_site_engine/pages_controller.rb', line 3

def show
  @page = content_store.page_for_path(request.path)
  raise ActionController::RoutingError, "Not Found" unless @page

  @contact_message = ContactMessage.new if page_has_contact_form?(@page)

  render :show
end