Constants in Events looks good now
This commit is contained in:
parent
b9f8b40190
commit
839957cf56
13 changed files with 43 additions and 43 deletions
|
@ -7,7 +7,7 @@ class UsersProjectObserver < ActiveRecord::Observer
|
|||
def after_create(users_project)
|
||||
Event.create(
|
||||
project_id: users_project.project.id,
|
||||
action: Event::Joined,
|
||||
action: Event::JOINED,
|
||||
author_id: users_project.user.id
|
||||
)
|
||||
end
|
||||
|
@ -15,7 +15,7 @@ class UsersProjectObserver < ActiveRecord::Observer
|
|||
def after_destroy(users_project)
|
||||
Event.create(
|
||||
project_id: users_project.project.id,
|
||||
action: Event::Left,
|
||||
action: Event::LEFT,
|
||||
author_id: users_project.user.id
|
||||
)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue