-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Description
Hi all,
I need to make call while disabling one of the observers, but there is something I have noticed. Due to some sensitive information, I'll replace the names of classes. For the purpose of this issue, I am using Rails 4.2.11 and rails-observer 0.1.5.
I've tried all of these on the rails console:
ActiveRecord::Base.observersreturns all of the observers I have defined inconfig.active_record.observers.Foo.observersreturns an empty array, even though I do haveFooObserverand it's inconfig.active_record.observers. I even checked to make sureActiveRecord::Base.observershasfoo_observerwhich appears to be the case.- So I then tried to disable by calling
ActiveRecord::Base.observers.disable :foo_observer, but got the following output:
=> [PgSearch::Document(Table doesn't exist),
ApplicationRecord(abstract),
... the rest may be irrelevant, since it's all model definitions. Interestingly enough, I don't see the model Foo in the list, even though it does exist and I can invoke it...
]
I hope this is enough information and hope someone has a good solution on how I can get around it.
Metadata
Metadata
Assignees
Labels
No labels