Sha256: a82aeead6505b87c1d2470c479bcbf7796bdd53836e1129ae5d6ac17fdec7719
Contents?: true
Size: 346 Bytes
Versions: 3
Compression:
Stored size: 346 Bytes
Contents
class PagesController < ApplicationController def show @site = Site.where(:domain => request.host).first || Site.first if @page = @site.pages.published.select{ |p| p.slug =~ /#{params[:path]}/i }.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.4 | app/controllers/pages_controller.rb |
site_logic-1.9.3 | app/controllers/pages_controller.rb |
site_logic-1.9.2 | app/controllers/pages_controller.rb |