Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update digestor code based on review

  • Loading branch information...
commit af1dc7f08a4e63cde7bd33d1c2afc782de65383d 1 parent 6c04cb2
Brad Murray wyaeld authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionview/lib/action_view/digestor.rb
4 actionview/lib/action_view/digestor.rb
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.