Hi,
you guyes are doing what I want to implement soon. So I had some
thoughts about an activity log. Pretty sure polymorphic associations
are a good choice. To keep the rest clean from logging code and the
logging flexible, I thought about using an observer, like
class ActivityObserver < ActiveRecord::Observer
observe :model_2_observe_01, model_2_observe_2 #, ...
def after_save(record)
activity = Activity.new(record)
activity.save
end
end
Should do it. I just wonder if Rails ensures ACID behavoir for
observers, anyone knows?
Cheers,
Chris
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---