提交 a45f7262 编写于 作者: C C. Morgan Hamill

Clean up of `name` fallback code.

Don't use `unless` for the conditional.
Avoid double-quotes where possible.
上级 9e805b77
......@@ -65,10 +65,10 @@ module Gitlab
end
def name
unless auth.info.name.nil?
auth.info.name.to_s.force_encoding("utf-8")
if !auth.info.name.nil?
auth.info.name.to_s.force_encoding('utf-8')
else
"#{auth.info.first_name} #{auth.info.last_name}".force_encoding("utf-8")
"#{auth.info.first_name} #{auth.info.last_name}".force_encoding('utf-8')
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册