title: how to safely replace all whitespaces with underscores with ruby?
body: <p>This works for any strings that have whitespaces in them</p>
  
  <pre><code>str.downcase.tr!(" ", "_")
  </code></pre>
  
  <p>but strings that dont have whitespaces just get deleted</p>
  
  <p>So "New School" would change into "new_school" but "color" would be "", nothing!</p>