Flushing content blocks
- Published
By default, multiple calls of the content_for helper using the same identifier will concatenate and output them together.
Set flush: true to flush all previous content_for calls:
<% content_for :example do %>
This block is flushed.
<% end %>
<% content_for :example, flush: true do %>
This block will display.
<% end %>
<%= content_for :example %>
Only the second block is rendered.