On Tue, Dec 21, 2010 at 4:44 PM, Tim Shaffer <timshaf...@me.com> wrote: > I'm pretty sure you need to pass the ID along with the attributes, otherwise > Rails creates a new instance: Yes, that's pretty much what's happening. I, actually, was a moron, since I should have see the code in first place. The update_attributes method in ActiveRecord::Base is stupidly simple and it's really clear what it does:
2666 def update_attributes(attributes) 2667 with_transaction_returning_status(:update_attributes_inside_transaction, attributes) 2668 end 2669 2670 def update_attributes_inside_transaction(attributes) #:nodoc: 2671 self.attributes = attributes 2672 save 2673 end Duh! Sorry guys. My bad. Thanks anyway for your time, Tim. -- Leonardo Mateo. There's no place like ~ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.