Created
October 29, 2012 10:16
-
-
Save electronicbites/3972759 to your computer and use it in GitHub Desktop.
yield_for content block either set or blank
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 yield_for name, default = "" | |
output = content_for(name) | |
output.blank? ? default : output | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment