module ActionView::LookupContext::DetailsCache - actionview-4.2.4 Documentation

# module ActionView::LookupContext::DetailsCache

Add caching behavior on top of Details.

### Attributes

cache[RW]

### Public Instance Methods

disable_cache() { || ... } click to toggle source

Temporary skip passing the details_key forward.

    # File lib/action_view/lookup_context.rb, line 94
    def disable_cache
      old_value, @cache = @cache, false
      yield
    ensure
      @cache = old_value
    end

### Protected Instance Methods

_set_detail(key, value) click to toggle source

    # File lib/action_view/lookup_context.rb, line 103
    def _set_detail(key, value)
      @details = @details.dup if @details_key
      @details_key = nil
      @details[key] = value
    end