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
iv
gitlab-ce
Commits
b522ef4b
Commit
b522ef4b
authored
Feb 29, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Respond to .json requests
parent
703ea298
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
3 deletions
+24
-3
app/controllers/users_controller.rb
app/controllers/users_controller.rb
+24
-3
No files found.
app/controllers/users_controller.rb
View file @
b522ef4b
...
...
@@ -21,19 +21,40 @@ class UsersController < ApplicationController
def
groups
load_groups
render
'shared/groups/_list'
,
locals:
{
groups:
@groups
},
layout:
false
respond_to
do
|
format
|
format
.
html
format
.
json
do
render
json:
{
html:
view_to_html_string
(
"shared/groups/_list"
,
groups:
@groups
)
}
end
end
end
def
user_projects
load_projects
render
'shared/projects/_list'
,
locals:
{
projects:
@projects
,
remote:
true
},
layout:
false
respond_to
do
|
format
|
format
.
html
format
.
json
do
render
json:
{
html:
view_to_html_string
(
"shared/projects/_list"
,
projects:
@projects
,
remote:
true
)
}
end
end
end
def
user_contributed_projects
load_contributed_projects
render
'shared/projects/_list'
,
locals:
{
projects:
@contributed_projects
},
layout:
false
respond_to
do
|
format
|
format
.
html
format
.
json
do
render
json:
{
html:
view_to_html_string
(
"shared/projects/_list"
,
projects:
@contributed_projects
)
}
end
end
end
def
calendar
...
...
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