Commit f0b87790 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Make url and actions to be the same name

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