title: Decimals and commas when entering a number into a Ruby on Rails form
body: <p>What's the best Ruby/Rails way to allow users to use decimals or commas when entering a number into a form? In other words, I would like the user be able to enter 2,000.99 and not get 2.00 in my database.</p>
  <p>Is there a best practice for this?</p>
  <p>Does gsub work with floats or bigintegers? Or does rails automatically cut the number off at the , when entering floats or ints into a form? I tried using self.price.gsub(&quot;,&quot;, &quot;&quot;) but get &quot;undefined method `gsub' for 8:Fixnum&quot; where 8 is whatever number I entered in the form.</p>