title: Rails data not being saved
body: <p>I have the following code snippets:</p>
  
  <pre><code>oldroompaxinfo = Roompaxinfo.find(:all, :conditions =&gt;["bkgitem_id = ?",bkgitemid])
  
  .... some code to identify which passenger ids have changed
  
  roompaxinfo = Roompaxinfo.find(:first, :conditions =&gt; ["bkgitem_id = ? and roomno = ?  and pax_id = ?", bkgitemid, roomno, oldpaxid])
  
  roompaxinfo.pax_id = newpaxid
  roompaxinfo.save
  
  ..... some code to send the changes to a remote service.
  
  #If errors occur during send I want to re-instate the old info 
  if retcode.index('Error') != nil
     oldroompaxinfo.each do |rp|
         rp.save
     end
  end
  </code></pre>
  
  <p>And the problem is that that last bit of code is NOT  saving the old data back.  In case somebody thinks  it is not being executed because of the condition check then I have  already proven that it does by outputting some stuff in flash.  I've also tried rp.save! but that didn't help either.</p>
  
  <p>I'm using MySQL with Ruby 1.8 and Rails 2.3.8</p>