title: Converting BigDecimal ActiveRecord to Ruby string
body: <p>I get a record from the DB like this:</p>
  
  <pre><code>@foo = Foo.find(params[:foo_id])
  </code></pre>
  
  <p>I need the whole <code>@foo</code> record but I need to use the <code>value</code> field in the ActiveRecord (of type BigDecimal).  I think I can do this (?):</p>
  
  <pre><code> @val = @foo.value
  </code></pre>
  
  <p>but how do I convert <code>@val</code> to a string?  I found a <code>to_str</code> method but I get:</p>
  
  <pre><code> undefined method `to_str' for #&lt;BigDecimal:7f88d4e5fa10,'0.5155170589 999999E2',27(45)&gt;
  </code></pre>
  
  <p>when I try and call <code>to_str</code> on <code>@val</code> like this:</p>
  
  <pre><code> @val = @foo.value.to_str # ERROR here
  </code></pre>