summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-03-17 09:13:20 +0000
committerPhil Hughes <me@iamphill.com>2016-03-17 09:13:20 +0000
commit81439c9093707d8964258db9481715b3ca0e7a3a (patch)
tree37a55b6c48240bddfc179420925853b4b3725c42
parent438d614b2780e280256af81f1e3f2f1847b3405e (diff)
downloadgitlab-ce-81439c9093707d8964258db9481715b3ca0e7a3a.tar.gz
Moved code to single line if
-rw-r--r--app/helpers/issuables_helper.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index 23f389b8c5f..81df2094392 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -25,11 +25,9 @@ module IssuablesHelper
if @project
member = @project.team.find_member(user_id)
- if member
- user = member.user
- end
+ user = member.user if member
else
- user = User.find(user_id)
+ user = User.find_by(id: user_id)
end
if user