We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b28728b commit 74ad49cCopy full SHA for 74ad49c
lib/mongoid/observers/railtie.rb
@@ -5,8 +5,8 @@ module Observers
5
class Railtie < ::Rails::Railtie
6
initializer "mongoid.observer" do |app|
7
ActiveSupport.on_load(:mongoid) do
8
- if observers = app.config.respond_to?(:mongoid) && app.config.mongoid.delete(:observers)
9
- send :observers=, observers
+ if app.config.respond_to?(:mongoid)
+ Mongoid.observers = app.config.mongoid.observers
10
end
11
12
0 commit comments