Skip to content

Commit 74ad49c

Browse files
committed
fix railtie
1 parent b28728b commit 74ad49c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/mongoid/observers/railtie.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ module Observers
55
class Railtie < ::Rails::Railtie
66
initializer "mongoid.observer" do |app|
77
ActiveSupport.on_load(:mongoid) do
8-
if observers = app.config.respond_to?(:mongoid) && app.config.mongoid.delete(:observers)
9-
send :observers=, observers
8+
if app.config.respond_to?(:mongoid)
9+
Mongoid.observers = app.config.mongoid.observers
1010
end
1111
end
1212
end

0 commit comments

Comments
 (0)