Sha256: 4aa5c7dda34df4cd84f6e7901d959db8f28332f24263aa3cb25cf1a92a95a8ad
Contents?: true
Size: 480 Bytes
Versions: 10
Compression:
Stored size: 480 Bytes
Contents
# The public-facing controller. Responsible for getting {Page} objects, collecting their {ContentBlock}s, and rendering their templates. class PagesController < ApplicationController layout 'public' caches_page :show # Finds the requested {Page} or raises ActiveRecord::RecordNotFound. def show if @page = Page.find(params[:id]) @content_blocks = @page.content_blocks render @page.slug else raise ActiveRecord::RecordNotFound end end end
Version data entries
10 entries across 10 versions & 1 rubygems