method

add_observer

rails latest stable - Class: ActiveModel::Observing::ClassMethods

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here.

add_observer(observer)
public

Add a new observer to the pool. The new observer needs to respond to ‘update’, otherwise it raises an ArgumentError exception.