[Git][noosfero/noosfero][master] Fix caching theme stylesheet with asset pipeline
Antonio Terceiro
gitlab at gitlab.com
Wed Aug 26 12:17:29 BRT 2015
Antonio Terceiro pushed to branch master at Noosfero / noosfero
Commits:
e520c0fb by Antonio Terceiro at 2015-08-26T12:16:47Z
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.
- - - - -
1 changed file:
- app/helpers/layout_helper.rb
Changes:
=====================================
app/helpers/layout_helper.rb
=====================================
--- a/app/helpers/layout_helper.rb
+++ b/app/helpers/layout_helper.rb
@@ -86,7 +86,7 @@ module LayoutHelper
end
def theme_stylesheet_path
- "/assets#{theme_path}/style.css"
+ "#{theme_path}/style.css".gsub(%r{^/}, '')
end
def layout_template
View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/e520c0fb8140399900ba610e9059d9ad81898cbc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150826/80825264/attachment.html>
More information about the Noosfero-dev
mailing list