Permalink
Switch branches/tags
Commits on Feb 9, 2014
Commits on Aug 13, 2011
  1. Allow ActiveRecord observers to be disabled.

    myronmarston committed Aug 13, 2011
    We have to use Observer#update rather than Observer#send since the enabled state is checked in #update before forwarding the method call on.
Commits on May 6, 2011
Commits on Apr 28, 2011
  1. Fix bug with AM::Observer disablement.

    myronmarston committed Apr 28, 2011
    Now that we propagate the enabling/disabling to descendants, we no longer have to check the disabled_observer Set on each superclass of the model class.  This was causing a bug when disabling all observers at a superclass level and then enabling an individual observer at a subclass level.
    
    Plus the logic is simpler now :).
  2. Fix dev env memory leaks by using AS::DescendantsTracker rather than …

    myronmarston committed Apr 28, 2011
    …keeping track of subclasses manually.
    
    There's also no need to keep track of all ObserverArray instances in a hash, as this is likely to leak memory, too.
  3. Revert "Revert "Handle enabling/disabling observers at different leve…

    myronmarston committed Apr 28, 2011
    …ls of the class hierarchy.""
    
    This reverts commit 2a25c58.
    
    I'm going to add another commit that keeps the same behavior of fixes
    the problems of leaking memory in development.
  4. Handle enabling/disabling observers at different levels of the class …

    myronmarston authored and dhh committed Apr 27, 2011
    …hierarchy.
    
    Last call wins.
  5. Allow observers to be enabled and disabled.

    myronmarston authored and dhh committed Apr 27, 2011
    This is useful in situations like model unit tests and the occasional rake task to backfill old data.