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
1
Merge Requests
1
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
nexedi
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
...
@@ -65,10 +65,10 @@ module Gitlab
end
end
def
name
def
name
if
!
auth
.
info
.
name
.
nil?
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'
)
else
auth
.
info
.
name
.
to_s
.
force_encoding
(
'utf-8'
)
end
end
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