forked from OpenNeo/impress
Emi Matchu
1f0c8b87a6
I thought to myself, "I wonder if it's possible to use a sneaky hacky `content_for` trick to be able to run this code in the template." And indeed it is! It's tricky cuz like, I want to render this template, and I want to provide _multiple_ slots of content to it. So, in this variant, we keep the block as being primarily for the actions, but also optionally accept `content_for :subtitle` inside that block, too. Executing that correctly is a bit tricky! The subtitle comes *before* the actions. So, we `yield` the actions block immediately, save it to a variable, and *then* get the subtitle block. |
||
---|---|---|
.. | ||
_item.html.haml | ||
_item_header.html.haml | ||
_item_link.html.haml | ||
_item_list_row.html.haml | ||
index.html.haml | ||
needed.html.haml | ||
show.html.haml | ||
sources.html.haml |