From 1ca3fbfbf2dfc9b2bff46ca680a89e005a1fc2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 22 Sep 2011 12:26:27 +0200 Subject: No need to recalculate the @details_key after update_details. --- actionpack/lib/action_view/lookup_context.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/lookup_context.rb b/actionpack/lib/action_view/lookup_context.rb index a119df003a..a1fa1c0b6f 100644 --- a/actionpack/lib/action_view/lookup_context.rb +++ b/actionpack/lib/action_view/lookup_context.rb @@ -93,14 +93,13 @@ module ActionView # the execution of the block and reverted to the previous value after. def update_details(new_details) if block_given? - old_details = @details.dup + old_details, old_key = @details.dup, @details_key super begin yield ensure - @details_key = nil - @details = old_details + @details, @details_key = old_details, old_key end else super -- cgit v1.2.3