lib/reactor/models/concerns/publishable.rb in reactor-0.4.3 vs lib/reactor/models/concerns/publishable.rb in reactor-0.4.4
- old
+ new
@@ -35,19 +35,19 @@
when Symbol
send(ifarg)
else
true
end
- Reactor::Event.delay.publish name, event if need_to_fire
+ Reactor::Event.publish name, event if need_to_fire
end
end
def reschedule_events
self.class.events.each do |name, data|
attr_changed_method = "#{data[:watch] || data[:at]}_changed?"
if data[:at] && respond_to?(attr_changed_method) && send(attr_changed_method)
- Reactor::Event.delay.reschedule name,
+ Reactor::Event.reschedule name,
at: send(data[:at]),
actor: ( data[:actor] ? send(data[:actor]) : self ),
target: ( data[:target] ? self : nil),
was: send("#{data[:at]}_was")
end
@@ -56,10 +56,10 @@
when Proc
instance_exec &ifarg
when Symbol
send(ifarg)
end
- Reactor::Event.delay.publish name, actor: self if need_to_fire
+ Reactor::Event.publish name, actor: self if need_to_fire
end
end
end
end
\ No newline at end of file