public
Fork of ninjudd/after_commit
Description: A Ruby on Rails plugin to add an after_commit callback. This can be used to trigger things only after the entire transaction is complete.
Homepage:
Clone URL: git://github.com/trotter/after_commit.git
after_commit / README
100644 19 lines (14 sloc) 0.756 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
after_commit
===========
 
A Ruby on Rails plugin to add after_commit callbacks. The callbacks that are provided can be used
to trigger events that run only after the entire transaction is complete. This is beneficial
in situations where you are doing asynchronous processing and need committed objects.
 
The following callbacks are provided:
  
   * (1) after_commit
   * (2) after_commit_on_create
   * (3) after_commit_on_update
   * (4) after_commit_on_destroy
   * (5) after_rollback
   
The after_commit callback is run for any object that has just been committed. You can obtain finer
callback control by using the additional <tt>after_commit_on_*</tt> callbacks. The after_rollback
callback is like after_commit, but called when a rollback occurs.