1

I'm implementing an ActivityStream for my site based on the answer provided in this question: What's the best manner of implementing a social activity stream?.

My approach is to use observers after_create to create the activity record, including the metadata. I have a ton of observers, and don't want to write exception handling block for each one. Is there a way I can use some super observer class to handle the exceptions, with the observer subclasses calling a yield?

Community
  • 1
  • 1
keruilin
  • 16,782
  • 34
  • 108
  • 175

1 Answers1

0

Not entirely sure if it applies, but i would create a module with all the shared code (i am guessing a lot of code is similar), and include that in each observer.

nathanvda
  • 49,707
  • 13
  • 117
  • 139