aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorBrad Murray <wyaeld@gmail.com>2013-10-17 09:00:37 +1300
committerBrad Murray <wyaeld@gmail.com>2013-10-17 09:00:37 +1300
commit0cdce7f910708005acd99c80463e9efb3df942b0 (patch)
treec6ff9ad84eae54fc22cec3fb014334946f7b826d /actionview
parentaf1dc7f08a4e63cde7bd33d1c2afc782de65383d (diff)
downloadrails-0cdce7f910708005acd99c80463e9efb3df942b0.tar.gz
rails-0cdce7f910708005acd99c80463e9efb3df942b0.tar.bz2
rails-0cdce7f910708005acd99c80463e9efb3df942b0.zip
add a new local variable to track if digests are being stored, to ensure the cleanup works correctly
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/digestor.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/digestor.rb b/actionview/lib/action_view/digestor.rb
index 6757d0cdd1..5570e2a8dc 100644
--- a/actionview/lib/action_view/digestor.rb
+++ b/actionview/lib/action_view/digestor.rb
@@ -37,11 +37,11 @@ module ActionView
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?
+ @@cache[cache_key] = stored_digest = 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 && !stored_digest
end
end