Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
04561011
Commit
04561011
authored
May 08, 2014
by
C. Morgan Hamill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up conditional statement in `name` method.
Reverse the conditional order to avoid awkward `if !` construction.
parent
a45f7262
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lib/gitlab/oauth/user.rb
lib/gitlab/oauth/user.rb
+3
-3
No files found.
lib/gitlab/oauth/user.rb
View file @
04561011
...
...
@@ -65,10 +65,10 @@ module Gitlab
end
def
name
if
!
auth
.
info
.
name
.
nil?
auth
.
info
.
name
.
to_s
.
force_encoding
(
'utf-8'
)
else
if
auth
.
info
.
name
.
nil?
"
#{
auth
.
info
.
first_name
}
#{
auth
.
info
.
last_name
}
"
.
force_encoding
(
'utf-8'
)
else
auth
.
info
.
name
.
to_s
.
force_encoding
(
'utf-8'
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment