diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-11-27 11:16:47 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-11-27 11:16:47 +0000 |
commit | 885605b439dec39b23d2043c436d03b447ad919c (patch) | |
tree | 978eab45c993b38c3f684ed19aa24913e2065394 /config | |
parent | b95fd6315c9b82eb65244b1a5b13bd1b69afe529 (diff) | |
download | redmine-885605b439dec39b23d2043c436d03b447ad919c.tar.gz redmine-885605b439dec39b23d2043c436d03b447ad919c.zip |
Resourcified attachments.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7948 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config')
-rw-r--r-- | config/routes.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/config/routes.rb b/config/routes.rb index dd21ef27b..833f23849 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -215,9 +215,9 @@ ActionController::Routing::Routes.draw do |map| repositories.connect 'projects/:id/repository/:action', :conditions => {:method => :post} end - - map.connect 'attachments/:id', :controller => 'attachments', :action => 'show', :id => /\d+/ - map.connect 'attachments/:id.:format', :controller => 'attachments', :action => 'show', :id => /\d+/ + + map.resources :attachments, :only => [:show, :destroy] + # additional routes for having the file name at the end of url map.connect 'attachments/:id/:filename', :controller => 'attachments', :action => 'show', :id => /\d+/, :filename => /.*/ map.connect 'attachments/download/:id/:filename', :controller => 'attachments', :action => 'download', :id => /\d+/, :filename => /.*/ |