title: Processing data before saving to database
body: <p>I have decimal field in my DB. Users can input values in two formats: with comma or point (11,11 or 11.11).</p>
  
  <p>But MySQL allows to save data only in 'point' format, so i want to process data before saving with regex like this:</p>
  
  <pre><code>sub(/,/,".")
  </code></pre>
  
  <p>How can i do it in Rails3?</p>