lib/reactor/models/concerns/subscribable.rb in reactor-0.11.0 vs lib/reactor/models/concerns/subscribable.rb in reactor-0.11.1
- old
+ new
@@ -66,13 +66,14 @@
end
static_subscriber_namespace.const_set(handler_name, klass)
end
def static_subscriber_namespace
- unless Reactor::StaticSubscribers.const_defined?(self.name, false)
- Reactor::StaticSubscribers.const_set(self.name, Module.new)
+ ns = self.name.demodulize
+ unless Reactor::StaticSubscribers.const_defined?(ns, false)
+ Reactor::StaticSubscribers.const_set(ns, Module.new)
end
- Reactor::StaticSubscribers.const_get(self.name, false)
+ Reactor::StaticSubscribers.const_get(ns, false)
end
end
end