summaryrefslogtreecommitdiffstats
path: root/config/routes.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2022-10-20 04:33:11 +0000
committerGo MAEDA <maeda@farend.jp>2022-10-20 04:33:11 +0000
commiteea816ae0825a3d794e650d11a3909ace772152b (patch)
treecbd67adb8c0e0bdf2e4addd12299ffd154a8732f /config/routes.rb
parentc02e3bfaec5fb45bd02d840b2306a875cc4f7f88 (diff)
downloadredmine-eea816ae0825a3d794e650d11a3909ace772152b.tar.gz
redmine-eea816ae0825a3d794e650d11a3909ace772152b.zip
Merged r21906 from trunk to 5.0-stable (#37772).
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@21909 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 5cb0055e5..1cfcc7b06 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -312,9 +312,11 @@ Rails.application.routes.draw do
get 'attachments/download/:id', :to => 'attachments#download', :id => /\d+/
get 'attachments/thumbnail/:id(/:size)', :to => 'attachments#thumbnail', :id => /\d+/, :size => /\d+/, :as => 'thumbnail'
resources :attachments, :only => [:show, :update, :destroy]
- get 'attachments/:object_type/:object_id/edit', :to => 'attachments#edit_all', :as => :object_attachments_edit
- patch 'attachments/:object_type/:object_id', :to => 'attachments#update_all', :as => :object_attachments
- get 'attachments/:object_type/:object_id/download', :to => 'attachments#download_all', :as => :object_attachments_download
+ constraints object_type: /(issues|versions|news|messages|wiki_pages|projects|documents|journals)/ do
+ get 'attachments/:object_type/:object_id/edit', :to => 'attachments#edit_all', :as => :object_attachments_edit
+ patch 'attachments/:object_type/:object_id', :to => 'attachments#update_all', :as => :object_attachments
+ get 'attachments/:object_type/:object_id/download', :to => 'attachments#download_all', :as => :object_attachments_download
+ end
resources :groups do
resources :memberships, :controller => 'principal_memberships'