Skip to content

Instantly share code, notes, and snippets.

@mchelen
Last active November 7, 2016 14:37
Show Gist options
  • Save mchelen/e4df571d4579007fea698a5a39b85846 to your computer and use it in GitHub Desktop.
Save mchelen/e4df571d4579007fea698a5a39b85846 to your computer and use it in GitHub Desktop.
ruby helper
<%= something do-%>
<h4>hello world</h4>
<% end -%>
<div class="something">
<h4>hello world</h4>
</div>
# something
module SomeHelper
def something(&block)
'<div class="something">' + capture(&block) + '</div>'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment