From e9b65a3e05ca3bf4ea42f547f42a133802037b7e Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Tue, 23 Jun 2015 18:04:21 -0400 Subject: Only look up Commit authors/committers by email - Removes looking up authors/committers by name - Renames `User.find_for_commit` to `User.find_by_any_email` --- app/models/commit.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/models/commit.rb') diff --git a/app/models/commit.rb b/app/models/commit.rb index 9d721661629..aff329d71fa 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -157,11 +157,11 @@ class Commit end def author - User.find_for_commit(author_email, author_name) + @author ||= User.find_by_any_email(author_email) end def committer - User.find_for_commit(committer_email, committer_name) + @committer ||= User.find_by_any_email(committer_email) end def notes -- cgit v1.2.1