Sha256: c9b43166e19050b9997bc630e2056722d36224edecf69c7bc184bee5319395cf
Contents?: true
Size: 588 Bytes
Versions: 9
Compression:
Stored size: 588 Bytes
Contents
module Desert module Rails module Observer def self.observers=(*observers) @observers = observers.flatten end def self.observers @observers ||= [] end end end end class Rails::Initializer def load_observers_with_desert # todo verify if this should be logged puts "Adding #{Desert::Rails::Observer.observers.inspect} to #{ActiveRecord::Base.observers.inspect}" ActiveRecord::Base.observers += Desert::Rails::Observer.observers.uniq load_observers_without_desert end alias_method_chain :load_observers, :desert end
Version data entries
9 entries across 9 versions & 5 rubygems