Created
          June 7, 2012 17:19 
        
      - 
      
- 
        Save justincaldwell/2890156 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 yield_with_default(name, content = nil, &block) | |
| if content_for?(name) | |
| content_for(name) | |
| else | |
| block_given? ? capture(&block) : content | |
| end | |
| end | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment