Sha256: 1b3ab946c7587f389321b86c1566181c7972b9f3a2aa5c6d081240a7d830bee7
Contents?: true
Size: 600 Bytes
Versions: 8
Compression:
Stored size: 600 Bytes
Contents
class ContentController < Spree::BaseController before_filter :render_404, :if => :static_asset rescue_from ActionView::MissingTemplate, :with => :render_404 caches_page :show, :index, :if => Proc.new { Spree::Config[:cache_static_content] } def show render params[:path] end def cvv render "cvv", :layout => false end private # Determines if the requested resource has a path similar to that of a static asset. In this case do not go through the # overhead of trying to render a template or whatever. def static_asset params[:path] =~ /^\/([^.]+)$/ end end
Version data entries
8 entries across 8 versions & 1 rubygems