diff options
author | C. Morgan Hamill <chamill@wesleyan.edu> | 2014-05-08 00:41:35 +0400 |
---|---|---|
committer | C. Morgan Hamill <chamill@wesleyan.edu> | 2014-05-08 00:41:35 +0400 |
commit | a45f7262f9a3e26361b6fde4f77d0d27437535cf (patch) | |
tree | 84b3204da1e863a8119473c22cac14df52beab03 /lib | |
parent | 9e805b77544df5be602d0c218d7be1047eb6729f (diff) |
Clean up of `name` fallback code.
Don't use `unless` for the conditional.
Avoid double-quotes where possible.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/oauth/user.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/oauth/user.rb b/lib/gitlab/oauth/user.rb index c6f56c141e5..e9e57aa5742 100644 --- a/lib/gitlab/oauth/user.rb +++ b/lib/gitlab/oauth/user.rb @@ -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 |