diff options
author | Brad Murray <wyaeld@gmail.com> | 2013-10-15 21:08:47 +1300 |
---|---|---|
committer | Brad Murray <wyaeld@gmail.com> | 2013-10-15 21:08:47 +1300 |
commit | af1dc7f08a4e63cde7bd33d1c2afc782de65383d (patch) | |
tree | ddb051cbf7b24c03537b7512d873ddc08f5a9557 | |
parent | 6c04cb2261ee105e3566b8f84ccb355a649f6ce9 (diff) | |
download | rails-af1dc7f08a4e63cde7bd33d1c2afc782de65383d.tar.gz rails-af1dc7f08a4e63cde7bd33d1c2afc782de65383d.tar.bz2 rails-af1dc7f08a4e63cde7bd33d1c2afc782de65383d.zip |
update digestor code based on review
-rw-r--r-- | actionview/lib/action_view/digestor.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/digestor.rb b/actionview/lib/action_view/digestor.rb index dc353b04ea..6757d0cdd1 100644 --- a/actionview/lib/action_view/digestor.rb +++ b/actionview/lib/action_view/digestor.rb @@ -35,13 +35,13 @@ module ActionView 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 |