summaryrefslogtreecommitdiff
path: root/config/routes/group.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/routes/group.rb')
-rw-r--r--config/routes/group.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/config/routes/group.rb b/config/routes/group.rb
index 5b3e25d5e3d..06b464d79c8 100644
--- a/config/routes/group.rb
+++ b/config/routes/group.rb
@@ -1,3 +1,17 @@
+require 'constraints/group_url_constrainer'
+
+constraints(GroupUrlConstrainer.new) do
+ scope(path: ':id',
+ as: :group,
+ constraints: { id: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ },
+ controller: :groups) do
+ get '/', action: :show
+ patch '/', action: :update
+ put '/', action: :update
+ delete '/', action: :destroy
+ end
+end
+
resources :groups, constraints: { id: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ } do
member do
get :issues