method

add_observer

Importance_0
v3.0.9 - Show latest stable - 0 notes - Class: ActiveModel::Observing::ClassMethods
add_observer(observer) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activemodel/lib/active_model/observing.rb, line 42
      def add_observer(observer)
        unless observer.respond_to? :update
          raise ArgumentError, "observer needs to respond to `update'"
        end
        @observer_instances ||= []
        @observer_instances << observer
      end
Register or log in to add new notes.