rails/rails-observers

Disabling observers is not thread-safe

Opened this issue · 0 comments

Blayr commented

Disabling observers with methods like

ActiveRecord::Base.observers.disable :some_observer
   do_work
end

isn't thread-safe, and other threads will have the observer disabled for them as well.

There is a solution created by @djpate here:
https://github.com/djpate/rails-observers