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
Léo-Paul Géneau
gitlab-ce
Commits
e0f61a59
Commit
e0f61a59
authored
Feb 15, 2015
by
Vinnie Okada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use shorter map() syntax
parent
9e0467c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
app/controllers/profiles_controller.rb
app/controllers/profiles_controller.rb
+1
-3
app/views/admin/applications/index.html.haml
app/views/admin/applications/index.html.haml
+1
-1
No files found.
app/controllers/profiles_controller.rb
View file @
e0f61a59
...
...
@@ -16,9 +16,7 @@ class ProfilesController < ApplicationController
def
applications
@applications
=
current_user
.
oauth_applications
@authorized_tokens
=
current_user
.
oauth_authorized_tokens
@authorized_apps
=
@authorized_tokens
.
map
do
|
token
|
token
.
application
end
.
uniq
@authorized_apps
=
@authorized_tokens
.
map
(
&
:application
).
uniq
end
def
update
...
...
app/views/admin/applications/index.html.haml
View file @
e0f61a59
...
...
@@ -17,6 +17,6 @@
%tr
{
:id
=>
"application_#{application.id}"
}
%td
=
link_to
application
.
name
,
admin_application_path
(
application
)
%td
=
application
.
redirect_uri
%td
=
application
.
access_tokens
.
map
{
|
t
|
t
.
resource_owner_id
}
.
uniq
.
count
%td
=
application
.
access_tokens
.
map
(
&
:resource_owner_id
)
.
uniq
.
count
%td
=
link_to
'Edit'
,
edit_admin_application_path
(
application
),
class:
'btn btn-link'
%td
=
render
'delete_form'
,
application:
application
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