]> source.dussan.org Git - redmine.git/commitdiff
route: move attachments resources after matching
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 30 Dec 2011 12:52:08 +0000 (12:52 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 30 Dec 2011 12:52:08 +0000 (12:52 +0000)
On Rails3.0, 'match' needs before resources.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8439 e93f8b46-1217-0410-a6f0-8f06a7374b81

config/routes.rb

index af9c2410af26515be1d3df054a42be5b978256a3..480459bf2605151a5c55c3f801fcf5152f7de93b 100644 (file)
@@ -261,7 +261,6 @@ ActionController::Routing::Routes.draw do |map|
                          :conditions => {:method => :post}
   end
 
-  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 => /.*/,
@@ -272,6 +271,7 @@ ActionController::Routing::Routes.draw do |map|
   map.connect 'attachments/download/:id', :controller => 'attachments',
               :action => 'download', :id => /\d+/,
               :conditions => {:method => :get}
+  map.resources :attachments, :only => [:show, :destroy]
 
   map.resources :groups, :member => {:autocomplete_for_user => :get}
   map.group_users 'groups/:id/users', :controller => 'groups',