Commit b522ef4b authored by Alfredo Sumaran's avatar Alfredo Sumaran

Respond to .json requests

parent 703ea298
Pipeline #745373 failed with stage
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment