Skip to content

Instantly share code, notes, and snippets.

@electronicbites
Created October 29, 2012 10:16
Show Gist options
  • Save electronicbites/3972759 to your computer and use it in GitHub Desktop.
Save electronicbites/3972759 to your computer and use it in GitHub Desktop.
yield_for content block either set or blank
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