title: Rails: How to update model records from console?
body: <p>I need to convert values stored in my Rails 3.0 application's database table from pounds to kilograms. This is a one-time task.</p>
  
  <p>Is this something I could do from the console? If so, how?  The values are stored in my weights table in the weight_entry column.</p>
  
  <p>I know it should look something like:</p>
  
  <pre><code>Weights.each do |weight|
    weight.weight_entry = weight.weight_entry * 0.45
    weight.save
  end
  </code></pre>
  
  <p>I don't know how to initialize the Weights constant though.</p>
  
  <p>Thanks for you help!</p>