Commit c940767f authored by Valery Sizov's avatar Valery Sizov

Notification:: small refactoring

parent 6a0defc3
No related merge requests found
......@@ -52,8 +52,7 @@ class MailerObserver < ActiveRecord::Observer
def changed_merge_request(merge_request)
if merge_request.assignee_id_changed?
recipients_ids = [merge_request.assignee_id_was]
recipients_ids << merge_request.assignee_id
recipients_ids = merge_request.assignee_id_was, merge_request.assignee_id
recipients_ids.delete current_user.id
User.find(recipients_ids).each do |user|
......@@ -64,8 +63,7 @@ class MailerObserver < ActiveRecord::Observer
def changed_issue(issue)
if issue.assignee_id_changed?
recipients_ids = [issue.assignee_id_was]
recipients_ids << issue.assignee_id
recipients_ids = issue.assignee_id_was, issue.assignee_id
recipients_ids.delete current_user.id
User.find(recipients_ids).each do |user|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment