summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-03-01 11:43:22 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2016-03-01 11:43:22 -0500
commitf0b877904703b9e22ffd4556a1872b0a20f55d36 (patch)
treeca0eff35ca4633430f4e658d2dc39718b70b93dc
parent10eb6d3cd7c9777d38558017073997d3b5be1c98 (diff)
downloadgitlab-ce-f0b877904703b9e22ffd4556a1872b0a20f55d36.tar.gz
Make url and actions to be the same name
-rw-r--r--app/assets/javascripts/user_tabs.js.coffee4
-rw-r--r--app/controllers/users_controller.rb4
-rw-r--r--app/views/users/show.html.haml6
-rw-r--r--config/routes.rb4
4 files changed, 9 insertions, 9 deletions
diff --git a/app/assets/javascripts/user_tabs.js.coffee b/app/assets/javascripts/user_tabs.js.coffee
index ebe02274802..53ee524867c 100644
--- a/app/assets/javascripts/user_tabs.js.coffee
+++ b/app/assets/javascripts/user_tabs.js.coffee
@@ -1,5 +1,5 @@
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'
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index a1ab9936535..eae19214bf5 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -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|
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index 15b1dbd508a..83aecca7716 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -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
diff --git a/config/routes.rb b/config/routes.rb
index e1448d231b5..52c532601b4 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -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,