Browse files

update digestor code based on review

  • Loading branch information...
1 parent 6c04cb2 commit af1dc7f08a4e63cde7bd33d1c2afc782de65383d @wyaeld wyaeld committed Oct 15, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionview/lib/action_view/digestor.rb
View
4 actionview/lib/action_view/digestor.rb
@@ -35,13 +35,13 @@ def compute_and_store_digest(cache_key, name, format, finder, options) # called
Digestor
end
- # Store the actual digest if config.cache_template_loading is true
digest = klass.new(name, format, finder, options).digest
+ # Store the actual digest if config.cache_template_loading is true
@@cache[cache_key] = digest if ActionView::Resolver.caching?
digest
ensure
# something went wrong or ActionView::Resolver.caching? is false, make sure not to corrupt the @@cache
- @@cache.delete_pair(cache_key, false) if pre_stored || !digest
+ @@cache.delete_pair(cache_key, false) if pre_stored && !digest
end
end

0 comments on commit af1dc7f

Please sign in to comment.