No need to recalculate the @details_key after update_details.

This commit is contained in:
José Valim 2011-09-22 12:26:27 +02:00
parent 8de0bbe0b4
commit 1ca3fbfbf2
1 changed files with 2 additions and 3 deletions

View File

@ -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