On 17 February 2010 09:15, Max Williams <[email protected]> wrote: > Jim Tobin wrote: >> Wouldn't ActiveRecord Observer class do what you're looking for? > > Observer has the same problem as callbacks - you can only hook them into > database transactions. I'm talking about the situation when you've > changed something and go on to do some other things without saving yet.
Also (just as a thought experiment), you would have to jump through lots of hoops to try to figure whether it was the foreign_key that was changed, or the associated object. With callbacks, you can only see that the two things are different, but not which one is most recent. -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

