Commit dc0ac2c516b795619e97b0954906a42600ac87de

Authored by Antonio Terceiro
1 parent e59af0ac

Fix caching theme stylesheet with asset pipeline

If stylesheet_link_tag gets's an absolute path starting with /assets, it
won't append a hash of the file contents to the URL, so if you update a
theme you won't get a new URL and varnish will cache the old stylesheet
for a month or so.

(cherry picked from commit e520c0fb8140399900ba610e9059d9ad81898cbc)
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/helpers/layout_helper.rb
... ... @@ -93,7 +93,7 @@ module LayoutHelper
93 93 end
94 94  
95 95 def theme_stylesheet_path
96   - "/assets#{theme_path}/style.css"
  96 + "#{theme_path}/style.css".gsub(%r{^/}, '')
97 97 end
98 98  
99 99 def layout_template
... ...