title: Stripping commas from Integers or decimals in rails
body: <p>Is there a gsub equivalent for integers or decimals? Should gsub work with integers? Basically I'm just trying to enter decimal into a ruby form and what the user to be able to use commas. For example, I want the user to be able to enter 1,000.99. </p>
  
  <p>I've tried using </p>
  
  <pre><code>before_save :strip_commas
  
  def strip_commas
      self.number = self.number.gsub(",", "")    
  end
  </code></pre>
  
  <p>but get the following error "undefined method `gsub' for 8:Fixnum" where "8" is replaced with whatever number the user enters. </p>