From a3f645ef51ec12ce93934b4ddb11313613d8c451 Mon Sep 17 00:00:00 2001 From: skv Date: Sun, 19 Jan 2014 22:55:59 +0400 Subject: Remove deprecated finders --- app/mailers/emails/issues.rb | 2 +- app/mailers/emails/merge_requests.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/mailers') diff --git a/app/mailers/emails/issues.rb b/app/mailers/emails/issues.rb index 5abdf99529c..b2b4b83d6c3 100644 --- a/app/mailers/emails/issues.rb +++ b/app/mailers/emails/issues.rb @@ -8,7 +8,7 @@ module Emails def reassigned_issue_email(recipient_id, issue_id, previous_assignee_id) @issue = Issue.find(issue_id) - @previous_assignee = User.find_by_id(previous_assignee_id) if previous_assignee_id + @previous_assignee = User.find_by(id: previous_assignee_id) if previous_assignee_id @project = @issue.project mail(to: recipient(recipient_id), subject: subject("Changed issue ##{@issue.iid}", @issue.title)) end diff --git a/app/mailers/emails/merge_requests.rb b/app/mailers/emails/merge_requests.rb index 25b8bf755e2..e60887d525a 100644 --- a/app/mailers/emails/merge_requests.rb +++ b/app/mailers/emails/merge_requests.rb @@ -8,7 +8,7 @@ module Emails def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id) @merge_request = MergeRequest.find(merge_request_id) - @previous_assignee = User.find_by_id(previous_assignee_id) if previous_assignee_id + @previous_assignee = User.find_by(id: previous_assignee_id) if previous_assignee_id @project = @merge_request.project mail(to: recipient(recipient_id), subject: subject("Changed merge request ##{@merge_request.iid}", @merge_request.title)) end -- cgit v1.2.1