Sha256: 78ddd8dd27b8fb0d13ea3fc22b02389234df1bcb1a9d3f309ff21b5ba38caae4
Contents?: true
Size: 621 Bytes
Versions: 3
Compression:
Stored size: 621 Bytes
Contents
class FrontEnd::PageController < FrontEndController before_filter :root_redirect def show @page = Dust::Page.find_by_filename(params[:filename]) @contact = Dust::Contact.new if @page == nil raise Exceptions::PageNotFound end rescue Exceptions::PageNotFound render :file => "#{Rails.root}/public/404.html", :layout => false, :status => 404 end def search @results = (params[:query].present? ? Dust::Block.search(params[:query]) : []) end def root_redirect if "/#{Dust.config.root}" == request.fullpath redirect_to root_url, :status => 301 end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dust-cms-0.0.07 | app/controllers/front_end/page_controller.rb |
dust-cms-0.0.06 | app/controllers/front_end/page_controller.rb |
dust-cms-0.0.05 | app/controllers/front_end/page_controller.rb |