Sha256: 3daf7d426cb492c3cb495d90e548c255198048784f04bf4fdd0ac1722b3364de
Contents?: true
Size: 645 Bytes
Versions: 1
Compression:
Stored size: 645 Bytes
Contents
class CmsContentController < ApplicationController include CmsCommon::RenderPage unloadable before_filter :parse_path, :only => :show def show @cms_page_slug = params[:path].join('/') @cms_page = CmsPage.published.find_by_full_path(@cms_page_slug) render_page end def sitemap respond_to do |format| format.xml do @cms_pages = CmsPage.all end end end protected def parse_path params[:format] = (params[:path].last && (match = params[:path].last.match(/\.(.*?)$/)) && match[1]) || 'html' params[:path].last && params[:path].last.gsub!(/\.(.*?)$/, '') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
comfortable_mexican_sofa-0.0.18 | app/controllers/cms_content_controller.rb |