Permalink
Browse files

Disable cache when loading template source

  • Loading branch information...
1 parent 5975566 commit 770a7e34617bf2face5c5909551b2d45b042b2df @BDQ BDQ committed Mar 8, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/deface/template_helper.rb
@@ -16,7 +16,9 @@ def load_template_source(virtual_path, partial, apply_overrides=true)
#this needs to be reviewed for production mode, overrides not present
Rails.application.config.deface.enabled = apply_overrides
@lookup_context ||= ActionView::LookupContext.new(ActionController::Base.view_paths, {:formats => [:html]})
- view = @lookup_context.find(name, prefix, partial)
+ view = @lookup_context.disable_cache do
+ @lookup_context.find(name, prefix, partial)
+ end
if view.handler.to_s == "Haml::Plugin"
Deface::HamlConverter.new(view.source).result

0 comments on commit 770a7e3

Please sign in to comment.