Module: ActiveRecord::Observing::ClassMethods

Module | ActiveRecord::Observing::ClassMethods
In: | lib/active_record/observer.rb

### Methods

inherited instantiate_observers observers observers=

### Public Instance methods

instantiate_observers()

Instantiate the global ActiveRecord observers

observers()

Gets the current observers.

observers=(*observers)

Activates the observers assigned. Examples:

      # Calls PersonObserver.instance
      ActiveRecord::Base.observers = :person_observer

      # Calls Cacher.instance and GarbageCollector.instance
      ActiveRecord::Base.observers = :cacher, :garbage_collector

      # Same as above, just using explicit class references
      ActiveRecord::Base.observers = Cacher, GarbageCollector

Note: Setting this does not instantiate the observers yet. instantiate_observers is called during startup, and before each development request.

### Protected Instance methods

inherited(subclass)

Notify observers when the observed class is subclassed.

[Validate]