Sha256: 4a99738f13391e582d90d600ee4757eba2bc84018398d4bc403a48e7ee684018
Contents?: true
Size: 332 Bytes
Versions: 3
Compression:
Stored size: 332 Bytes
Contents
class PagesController < ApplicationController def show @site = Site.where(:domain => request.host).first || Site.first if @page = @site.pages.published.by_slug(params[:path] || '/').first render :layout => @site.layout else raise Mongoid::Errors::DocumentNotFound.new Page, params[:path] end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
site_logic-1.9.7 | app/controllers/pages_controller.rb |
site_logic-1.9.6 | app/controllers/pages_controller.rb |
site_logic-1.9.5 | app/controllers/pages_controller.rb |