Module: NicePartials::PartialRendering
- Defined in:
- lib/nice_partials/monkey_patch.rb
Instance Method Summary collapse
-
#render_partial_template(view, locals, template, layout, block) ⇒ Object
Automatically captures the ‘block` in case the partial has no manual capturing `yield` call.
Instance Method Details
#render_partial_template(view, locals, template, layout, block) ⇒ Object
Automatically captures the ‘block` in case the partial has no manual capturing `yield` call.
This manual equivalent would be inserting this:
<% yield partial %>
112 113 114 115 |
# File 'lib/nice_partials/monkey_patch.rb', line 112 def render_partial_template(view, locals, template, layout, block) view.capture_with_outer_partial_access(&block) if block && !template.has_capturing_yield? super end |