Use Commits#show instead of Commits#index

Takes tree-ish + path as ID
This commit is contained in:
Robert Speicher 2012-09-20 15:32:00 -04:00
parent 169f16fb32
commit 3574826920
6 changed files with 19 additions and 45 deletions

View file

@ -159,13 +159,20 @@ Gitlab::Application.routes.draw do
end
end
resources :commit, only: [:show], constraints: {id: /[[:alnum:]]{6,40}/}
# XXX: WIP
resources :commit, only: [:show], constraints: {id: /[[:alnum:]]{6,40}/}
resources :commits, only: [:show], constraints: {id: /.+/}, as: 'history'
resources :blame, only: [:show], constraints: {id: /.+/}
resources :blob, only: [:show], constraints: {id: /.+/}
# resources :raw, only: [:show], constraints: {id: /.+/}
resources :tree, only: [:show], constraints: {id: /.+/}
match "/compare/:from...:to" => "compare#show", as: "compare", constraints: {from: /.+/, to: /.+/}
resources :commits, only: [:index, :show] do
member do
get :patch
end
end
# resources :commits, only: [:show], as: 'history' do
# member do
# get :patch
# end
# end
resources :team, controller: 'team_members', only: [:index]
resources :team_members
@ -184,13 +191,6 @@ Gitlab::Application.routes.draw do
post :preview
end
end
# XXX: WIP
resources :blame, only: [:show], constraints: {id: /.+/}
resources :blob, only: [:show], constraints: {id: /.+/}
# resources :raw, only: [:show], constraints: {id: /.+/}
resources :tree, only: [:show], constraints: {id: /.+/}
match "/compare/:from...:to" => "compare#show", as: "compare", constraints: {from: /.+/, to: /.+/}
end
root to: "dashboard#index"