While writing code to show themes in Zammu, I had to show the same button in two places on the same page. The easy way is to duplicate the code. But that causes problems with maintainability.
<%= content_for :secondary_nav do %>
To remove duplication I just used a
content_for and captured the code that had to be duplicated and used
yield to spit it out in the two places.
The changed code is:
Now if I have to change the button, I have to do it only in one place. Our code is DRY as a bone :)