Rails 3 after_commit callback:
In rails 3 after_commit gem’s all functionality is now natively available in its library. There is some syntax variation in Rails 2 and Rails 3 as follow
Syntax in Rails 3 :
# commit after every save
after_commit :my_method
# commit after on save record
after_commit :my_method : on => :create
# commit after on update record
after_commit :my_method : on => :update
# commit after on delete record
after_commit :my_method : on => :destroy
Syntax in Rails 2 :
# commit after every save
after_commit :my_method
# commit after on save record
after_commit_on_create :my_method
# commit after on update record
after_commit_on_update :my_method
# commit after on delete record
after_commit_on_destroy :my_method
So, for rails 3 now no need to install any gem or plugin of after_commit.
Good Luck
