First, get familiar with model callbacks if you're not already because
you don't want to put this logic in the controller:

http://guides.rails.info/activerecord_validations_callbacks.html#callbacks-overview

Then check out the dirty object feature that ActiveRecord provides and
how to use it:

http://api.rubyonrails.org/classes/ActiveRecord/Dirty.html
http://railscasts.com/episodes/109-tracking-attribute-changes

With that said, I'd probably write an "after_update" callback on
whatever model you're using and interrogate that object with what
"model.changed".
--~--~---------~--~----~------------~-------~--~----~
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-talk@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to