diff options
author | Rémy Coutable <remy@rymai.me> | 2016-06-17 15:06:55 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-06-18 06:46:45 +0300 |
commit | 4652489f40a4ff2b749f9ad495986a7a17448243 (patch) | |
tree | 90a373da8bdbaf66bc0228abf8465d9d928c9f2e /app/models/members | |
parent | 00906b5bb6cde8cb60281109060a519a54000c61 (diff) |
New Members::DestroyService
This is to ensure we don't send unwanted notifications when deleting a
project. In other words, stop abusing AR callbacks and use services.
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/models/members')
-rw-r--r-- | app/models/members/group_member.rb | 12 | ||||
-rw-r--r-- | app/models/members/project_member.rb | 12 |
2 files changed, 0 insertions, 24 deletions
diff --git a/app/models/members/group_member.rb b/app/models/members/group_member.rb index 363db877968..2f13d339c89 100644 --- a/app/models/members/group_member.rb +++ b/app/models/members/group_member.rb @@ -33,12 +33,6 @@ class GroupMember < Member super end - def send_request - notification_service.new_group_access_request(self) - - super - end - def post_create_hook notification_service.new_group_member(self) @@ -64,10 +58,4 @@ class GroupMember < Member super end - - def post_decline_request - notification_service.decline_group_access_request(self) - - super - end end diff --git a/app/models/members/project_member.rb b/app/models/members/project_member.rb index 250ee04fd1d..e9d3a82ba15 100644 --- a/app/models/members/project_member.rb +++ b/app/models/members/project_member.rb @@ -111,12 +111,6 @@ class ProjectMember < Member super end - def send_request - notification_service.new_project_access_request(self) - - super - end - def post_create_hook unless owner? event_service.join_project(self.project, self.user) @@ -152,12 +146,6 @@ class ProjectMember < Member super end - def post_decline_request - notification_service.decline_project_access_request(self) - - super - end - def event_service EventCreateService.new end |