Commit f0b87790 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Make url and actions to be the same name

parent 10eb6d3c
Pipeline #747783 failed with stage
class @UserTabs
actions: ['activity', 'groups', 'contributed_projects', 'projects'],
actions: ['activity', 'groups', 'contributed', 'projects'],
defaultAction: 'activity',
constructor: (@opts = {}) ->
......@@ -45,7 +45,7 @@ class @UserTabs
if action is 'groups'
@loadTab(source, action)
if action is 'contributed_projects'
if action is 'contributed'
@loadTab(source, action)
if action is 'projects'
......
......@@ -31,7 +31,7 @@ class UsersController < ApplicationController
end
end
def user_projects
def projects
load_projects
respond_to do |format|
......@@ -44,7 +44,7 @@ class UsersController < ApplicationController
end
end
def user_contributed_projects
def contributed
load_contributed_projects
respond_to do |format|
......
......@@ -76,8 +76,8 @@
%li.groups-tab
= link_to user_groups_path, data: {target: 'div#groups', action: 'groups', toggle: 'tab'} do
Groups
%li.contributed_projects-tab
= link_to user_contributed_projects_path, data: {target: 'div#contributed_projects', action: 'contributed_projects', toggle: 'tab'} do
%li.contributed-tab
= link_to user_contributed_projects_path, data: {target: 'div#contributed', action: 'contributed', toggle: 'tab'} do
Contributed projects
%li.projects-tab
= link_to user_projects_path, data: {target: 'div#projects', action: 'projects', toggle: 'tab'} do
......@@ -99,7 +99,7 @@
#groups.tab-pane
- # This tab is always loaded via AJAX
#contributed_projects.tab-pane
#contributed.tab-pane
- # This tab is always loaded via AJAX
#projects.tab-pane
......
......@@ -335,10 +335,10 @@ Rails.application.routes.draw do
get 'u/:username/groups' => 'users#groups', as: :user_groups,
constraints: { username: /.*/ }
get 'u/:username/projects' => 'users#user_projects', as: :user_projects,
get 'u/:username/projects' => 'users#projects', as: :user_projects,
constraints: { username: /.*/ }
get 'u/:username/contributed_projects' => 'users#user_contributed_projects', as: :user_contributed_projects,
get 'u/:username/contributed' => 'users#contributed', as: :user_contributed_projects,
constraints: { username: /.*/ }
get '/u/:username' => 'users#show', as: :user,
......
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