Method: ActiveModel::Observer#update

Defined in:
lib/active_model/observing.rb

#update(observed_method, object, &block) ⇒ Object

Send observed_method(object) if the method exists and the observer is enabled for the given object’s class.



228
229
230
231
232
# File 'lib/active_model/observing.rb', line 228

def update(observed_method, object, &block) #:nodoc:
  return unless respond_to?(observed_method)
  return if disabled_for?(object)
  send(observed_method, object, &block)
end