User joined project event added
This commit is contained in:
parent
a56cec1132
commit
a86bd87afc
10 changed files with 78 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue