Sha256: 6a330a03b6b2461e146431b774634dfd518fded981a358aed29a27bdb3d68cdd
Contents?: true
Size: 750 Bytes
Versions: 2
Compression:
Stored size: 750 Bytes
Contents
class Comfy::Cms::AssetsController < Comfy::Cms::BaseController skip_before_action :verify_authenticity_token before_action :load_cms_layout def render_css render :text => @cms_layout.css, :content_type => 'text/css' cache_control_header end def render_js render :text => @cms_layout.js, :content_type => 'application/javascript' cache_control_header end protected def cache_control_header if params[:cache_buster].present? response.headers['Cache-Control'] = "public, max-age=#{1.year.to_i}" end end def load_cms_layout @cms_layout = @cms_site.layouts.find_by_identifier!(params[:identifier]) rescue ActiveRecord::RecordNotFound render :nothing => true, :status => 404 end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
comfortable_mexican_sofa-1.12.2 | app/controllers/comfy/cms/assets_controller.rb |
comfortable_mexican_sofa-1.12.1 | app/controllers/comfy/cms/assets_controller.rb |