]> source.dussan.org Git - redmine.git/commitdiff
route: code layout clean up attachments route
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 26 Dec 2011 10:06:18 +0000 (10:06 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 26 Dec 2011 10:06:18 +0000 (10:06 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8378 e93f8b46-1217-0410-a6f0-8f06a7374b81

config/routes.rb

index ffd87f1532b6247aab6a245cab76dd6b48f68c97..466b29426dbab53fe43449a0337f22bb7d40ca38 100644 (file)
@@ -224,9 +224,15 @@ ActionController::Routing::Routes.draw do |map|
 
   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 => /.*/, :conditions => {:method => :get}
-  map.connect 'attachments/download/:id/:filename', :controller => 'attachments', :action => 'download', :id => /\d+/, :filename => /.*/, :conditions => {:method => :get}
-  map.connect 'attachments/download/:id', :controller => 'attachments', :action => 'download', :id => /\d+/, :conditions => {:method => :get}
+  map.connect 'attachments/:id/:filename', :controller => 'attachments',
+              :action => 'show', :id => /\d+/, :filename => /.*/,
+              :conditions => {:method => :get}
+  map.connect 'attachments/download/:id/:filename', :controller => 'attachments',
+              :action => 'download', :id => /\d+/, :filename => /.*/,
+              :conditions => {:method => :get}
+  map.connect 'attachments/download/:id', :controller => 'attachments',
+              :action => 'download', :id => /\d+/,
+              :conditions => {:method => :get}
 
   map.resources :groups, :member => {:autocomplete_for_user => :get}
   map.group_users 'groups/:id/users', :controller => 'groups', :action => 'add_users', :id => /\d+/, :conditions => {:method => :post}