Commit a45f7262f9a3e26361b6fde4f77d0d27437535cf

Authored by C. Morgan Hamill
1 parent 9e805b77

Clean up of `name` fallback code.

Don't use `unless` for the conditional.
Avoid double-quotes where possible.
Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
lib/gitlab/oauth/user.rb
@@ -65,10 +65,10 @@ module Gitlab @@ -65,10 +65,10 @@ module Gitlab
65 end 65 end
66 66
67 def name 67 def name
68 - unless auth.info.name.nil?  
69 - auth.info.name.to_s.force_encoding("utf-8") 68 + if !auth.info.name.nil?
  69 + auth.info.name.to_s.force_encoding('utf-8')
70 else 70 else
71 - "#{auth.info.first_name} #{auth.info.last_name}".force_encoding("utf-8") 71 + "#{auth.info.first_name} #{auth.info.last_name}".force_encoding('utf-8')
72 end 72 end
73 end 73 end
74 74