Commit e520c0fb8140399900ba610e9059d9ad81898cbc

Authored by Antonio Terceiro
1 parent 8f633a81

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.
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/helpers/layout_helper.rb
... ... @@ -86,7 +86,7 @@ module LayoutHelper
86 86 end
87 87  
88 88 def theme_stylesheet_path
89   - "/assets#{theme_path}/style.css"
  89 + "#{theme_path}/style.css".gsub(%r{^/}, '')
90 90 end
91 91  
92 92 def layout_template
... ...