diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2023-12-22 02:13:32 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2023-12-22 02:13:32 +0000 |
commit | 73ffd58bfaf9bfb0a8dab3693336f9b349acab85 (patch) | |
tree | 7fcb7d3725c4c9bc46cbb7402f3c6d6e2080f5e7 /config | |
parent | 002187d8b618e01a1427dca7d1f120449dcb560f (diff) | |
download | redmine-73ffd58bfaf9bfb0a8dab3693336f9b349acab85.tar.gz redmine-73ffd58bfaf9bfb0a8dab3693336f9b349acab85.zip |
Merge r22551 from trunk to 5.1-stable (#39862).
git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@22552 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config')
-rw-r--r-- | config/routes.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb index 6176fdfae..12be7b3ec 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -317,7 +317,9 @@ 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] - constraints object_type: /(issues|versions|news|messages|wiki_pages|projects|documents|journals)/ do + + # register plugin object types with ObjectTypeConstraint.register_object_type(PluginModel.name.underscore.pluralize') + constraints Redmine::Acts::Attachable::ObjectTypeConstraint 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 |