-
Notifications
You must be signed in to change notification settings - Fork 151
Global listeners and Spring
jmarceli edited this page Apr 28, 2016
·
1 revision
In order to use Rails Spring with Wisper global listeners e.g.
config/initializers/wisper.rb (global listener example)
Wisper.subscribe(SomeObserver.new)
you have to change config/initializers/wisper.rb
and force listeners clearing on each request.
Rails.application.config.to_prepare do
Wisper.clear if Rails.env.development? || Rails.env.test?
Wisper.subscribe(SomeObserver.new)
end
For more info see: http://stackoverflow.com/questions/36899306/rails-spring-wisper-listener-method-caching/36908999
Need to ask a question? Please ask on StackOverflow tagging the question with wisper.
Found a bug? Please report it on the Issue tracker.