Sha256: 7b092370050af570e7a78019dfb1177e2a6ac8585360692e696171f19baf58a9
Contents?: true
Size: 479 Bytes
Versions: 7
Compression:
Stored size: 479 Bytes
Contents
class StaticContentController < Spree::BaseController caches_action :show def show path = case params[:path] when Array '/' + params[:path].join("/") when String params[:path] when nil request.path end unless @page = Page.visible.find_by_slug(path) render :file => "#{RAILS_ROOT}/public/404.html", :layout => false, :status => 404 end end private def accurate_title @page ? @page.title : nil end end
Version data entries
7 entries across 7 versions & 1 rubygems