Sha256: bfd4d18a89a4d635212c6cce38a1871e1c467ec79cbdfadd7a3d7c966a69fd80
Contents?: true
Size: 361 Bytes
Versions: 6
Compression:
Stored size: 361 Bytes
Contents
class PagesController < ApplicationController def show @site = Site.where(:domain => request.host).first || Site.first slug = params[:path].blank? ? '/' : params[:path] if @page = @site.pages.published.by_slug(slug).first render :layout => @site.layout else raise Mongoid::Errors::DocumentNotFound.new Page, slug end end end
Version data entries
6 entries across 6 versions & 1 rubygems