Module: Backgrounded::ActiveRecordExtension::ClassMethods
- Defined in:
- lib/backgrounded/active_record_extension.rb
Instance Method Summary collapse
-
#after_commit_backgrounded(method_name, options = {}) ⇒ Object
execute a method in the background after the object is committed to the database.
Instance Method Details
#after_commit_backgrounded(method_name, options = {}) ⇒ Object
execute a method in the background after the object is committed to the database
11 12 13 14 15 |
# File 'lib/backgrounded/active_record_extension.rb', line 11 def after_commit_backgrounded(method_name, ={}) self.after_commit .except(:backgrounded) do |instance| instance.backgrounded([:backgrounded]).send(method_name) end end |