Created
April 28, 2010 17:14
-
-
Save dekart/382396 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def box(*args, &block) | |
| options = args.extract_options! | |
| content = block_given? ? capture(&block) : args.shift | |
| result = '<div class="box">%s</div>' % content | |
| result.html_safe! | |
| block_given? ? concat(result) : result | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <% box do %> | |
| Content goes here | |
| <% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment