Sha256: 21fa7e2906971b06e1a218448a6999b4da8979b3bbfde10600ea5bf2c38eabaa
Contents?: true
Size: 921 Bytes
Versions: 16
Compression:
Stored size: 921 Bytes
Contents
# Provides the mechinism to support applications that want to observe MList # models. # # ActiveRecord observers are reloaded at each request in development mode. # They will be registered with the MList models each time. Since the MList # models are required once at initialization, there will always only be one # instance of the model class, and therefore, many instances of the observer # class registered with it; all but the most recent are invalid, since they # were undefined when the dispatcher reloaded the application. # # Should we ever have observers in MList, this will likely need more careful # attention. # unless Rails.configuration.cache_classes class << ActiveRecord::Base def instantiate_observers_with_mlist_observers subclasses.each(&:delete_observers) instantiate_observers_without_mlist_observers end alias_method_chain :instantiate_observers, :mlist_observers end end
Version data entries
16 entries across 16 versions & 2 rubygems