title: How to trim input in rails models globally
body: <p>In my Rails app there are several models where users are posting data to the database. Lots of this data has trailing and leading whitespaces. Is there a way I can globally strip all input's leading and trailing whitespaces?</p>
  
  <p>I'd like to avoid doing this for every field in every model, seems like there could be a global way to handle this during a <code>before_save</code>.</p>
  
  <p>Any used techniques out there?</p>
  
  <p>Thanks</p>