After commit instead of after_update

This commit is contained in:
Alex Denisov 2012-09-03 20:48:38 +03:00
parent c7cfe3d83b
commit 1f1c8094fe
2 changed files with 12 additions and 8 deletions

View file

@ -1,9 +1,13 @@
class UsersProjectObserver < ActiveRecord::Observer
def after_create(users_project)
Notify.project_access_granted_email(users_project.id).deliver
end
#def after_create(users_project)
#Notify.project_access_granted_email(users_project.id).deliver
#end
def after_update(users_project)
#def after_update(users_project)
#Notify.project_access_granted_email(users_project.id).deliver
#end
def after_commit(users_project)
Notify.project_access_granted_email(users_project.id).deliver
end
end