Module: AsyncPartial::Renderer

Defined in:
lib/async_partial.rb

Instance Method Summary collapse

Instance Method Details

#render(context, options, block) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/async_partial.rb', line 7

def render(context, options, block)
  if (options.delete(:async) || (options[:locals]&.delete(:async)))
    AsyncResult.new(Thread.new { super })
  else
    super
  end
end