instance method update_details

Ruby on Rails 3.1.12

Since v3.0.20 Last seen in v3.1.12

Available in: v3.0.20 v3.1.12

Signature

update_details(new_details)

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.

Parameters

new_details req
Source
# File actionpack/lib/action_view/lookup_context.rb, line 223
      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

Defined in actionpack/lib/action_view/lookup_context.rb line 223 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionView::LookupContext::Details

Type at least 2 characters to search.

↑↓ navigate · open · esc close