title: Incrementing database value in Rails
body: <p>In Rails, I'd like to update some database value by incrementing it.
  Say, I have value 30 in a table and I'd like to add 0.5.</p>
  
  <p>Here is how I've tried to accomplish it:</p>
  
  <pre><code>Record.where(:status =&gt; "somestatus").first.value.to_f += 0.5
  </code></pre>
  
  <p>RoR complains saying "undefined method `to_f='".
  I know that I can obtain value first, calculate the result and update_attributes at the end. But what is the most efficient way to do it?</p>