User joined project event added

This commit is contained in:
Alex Denisov 2012-09-09 23:18:28 +03:00
parent a56cec1132
commit a86bd87afc
10 changed files with 78 additions and 3 deletions

View file

@ -1,6 +1,12 @@
class UsersProjectObserver < ActiveRecord::Observer
def after_create(users_project)
Notify.project_access_granted_email(users_project.id).deliver
Event.create(
project_id: users_project.project.id,
action: Event::Joined,
author_id: users_project.user.id
)
end
def after_update(users_project)