lib/sinatra/assetpack/class_methods.rb in sinatra-assetpack-0.2.0 vs lib/sinatra/assetpack/class_methods.rb in sinatra-assetpack-0.2.1
- old
+ new
@@ -84,12 +84,14 @@
else
# Dynamic file
not_found unless AssetPack.tilt_formats[format] == fmt
@template_cache.fetch(fn) {
- out = render format.to_sym, File.read(fn)
- out = asset_filter_css(out) if fmt == 'css'
- out
+ settings.assets.fetch_dynamic_asset(fn) {
+ out = render format.to_sym, File.read(fn)
+ out = asset_filter_css(out) if fmt == 'css'
+ out
+ }
}
end
end
end
end