instance method
observers
Ruby on Rails 3.1.12
Since v2.2.3 Last seen in v3.2.22.5Signature
observers()
Gets an array of observers observing this model. The array also provides enable and disable methods that allow you to selectively enable and disable observers. (see ActiveModel::ObserverArray.enable and ActiveModel::ObserverArray.disable for more on this)
Source
# File activemodel/lib/active_model/observing.rb, line 48
def observers
@observers ||= ObserverArray.new(self)
end
Defined in activemodel/lib/active_model/observing.rb line 48
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Observing::ClassMethods