Skip to content

Instantly share code, notes, and snippets.

@hejrobin
Created October 2, 2013 08:32
Show Gist options
  • Save hejrobin/6790700 to your computer and use it in GitHub Desktop.
Save hejrobin/6790700 to your computer and use it in GitHub Desktop.
# layout.html.erb
<div id="master">
<%= yield :person %>
<%= yield %>
</div>
# view.html.erb
<% content_for :person %>
<h1>Hej John</h1>
<% end %>
<h2>Whoop!</h2>
# output
<div id="master">
<h1>Hej John</h1>
<h2>Whoop!</h2>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment