From 4ca3db3f9d3bc288fe6b535aca6fb33b00f5e040 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 7 Nov 2016 15:34:25 +0200 Subject: Refactor group routing * separate controller actions from nested resources * prepare group routing for nested namespaces support Signed-off-by: Dmitriy Zaporozhets --- config/routes/group.rb | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'config') diff --git a/config/routes/group.rb b/config/routes/group.rb index 826048ba196..faec3f0ad56 100644 --- a/config/routes/group.rb +++ b/config/routes/group.rb @@ -12,26 +12,26 @@ constraints(GroupUrlConstrainer.new) do end end -scope constraints: { id: /[a-zA-Z.0-9_\-]+(? 'groups#show', as: :group_canonical + + resource :avatar, only: [:destroy] + resources :milestones, constraints: { id: /[^\/]+/ }, only: [:index, :show, :update, :new, :create] + resources :labels, except: [:show], constraints: { id: /\d+/ } end + +# Must be last route in this file +get 'groups/:id' => 'groups#show', as: :group_canonical -- cgit v1.2.3