README.md in reactor-0.5.3 vs README.md in reactor-0.6.0
- old
+ new
@@ -42,15 +42,21 @@
publishes :my_model_created
publishes :state_has_changed, if: -> { state_has_changed? }
#### Subscribable
- *New in 0.3*
-
You can now bind any block to an event in your models like so
on_event :any_event do |event|
- MyModel.find(event.target).do_something_about_it!
+ event.target.do_something_about_it!
+ end
+
+ Static subscribers like these are automatically placed into Sidekiq and executed in the background
+
+ It's also possible to run a subscriber block in memory like so
+
+ on_event :any_event, in_memory: true do |event|
+ event.target.do_something_about_it_and_make_the_user_wait!
end
## Contributing
1. Fork it