lib/action_view/lookup_context.rb
def update_details(new_details)
        old_details = @details.dup

        registered_detail_setters.each do |key, setter|
          send(setter, new_details[key]) if new_details.key?(key)
        end

        begin
          yield
        ensure
          @details_key = nil
          @details = old_details
        end
      end
# Update the details keys by merging the given hash into the current
# details hash. If a block is given, the details are modified just during
# the execution of the block and reverted to the previous value after.
Update the details keys by merging the given hash into the current
details hash. If a block is given, the details are modified just during
the execution of the block and reverted to the previous value after.
Update the details keys by merging the given hash into the current details hash . If a block is given the details are modified just during the execution of the block and reverted to the previous value after .
def update_details(new_details)
        old_details = @details.dup
        registered_detail_setters.each do |key, setter|
          send(setter, new_details[key]) if new_details.key?(key)
        end
        begin
          yield
        ensure
          @details_key = nil
          @details = old_details
        end
      end
def update_details ( new_details ) old_details = @details . dup registered_detail_setters . each do | key , setter | send ( setter , new_details [ key ] ) if new_details . key? ( key ) end begin yield ensure @details_key = nil @details = old_details end end
Update the details keys by merging the given hash into the current
details hash.
Update the details keys by merging the given hash into the current details hash .
new_details