title: rails convert string to number
body: <p>I am wondering what is a convenient function in Rails to convert a string with a negative sign into a number. e.g. <code>-1005.32</code></p>
  
  <p>When I use the <code>.to_f</code> method, the number becomes <code>1005</code> with the negative sign and decimal part being ignored.</p>