module CacheWithSettings::Helpers::RenderingHelper

Public Instance Methods

render(options = {}, locals = {}) { |block| ... } click to toggle source
Calls superclass method
# File lib/cache_with_settings/helpers/rendering_helper.rb, line 5
def render(options = {}, locals = {}, &block)
  if options.kind_of?(Hash) && options[:cached] == true
    options[:cached] = -> object { CacheWithSettings.compose_key(object) }
  end

  if block_given?
    super(options, locals) { yield(block) }
  else
    super(options, locals)
  end
end