Guest User

Untitled

a guest
Jul 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. # Enable embedded tasks for ActiveRecord classes. Provides:
  2. # class AModel < ActiveRecord::Base
  3. # always_background :a_method
  4. # end
  5. #
  6. # a_model_instance.background.another_method
  7. if defined?(TorqueBox::Messaging)
  8. require 'torquebox/messaging/embedded_tasks'
  9. ActiveRecord::Base.send(:include, TorqueBox::Messaging::EmbeddedTasks)
  10. end
Add Comment
Please, Sign In to add comment