Commits

Toshi MARUYAMA committed 3859db7

route: move attachments resources after matching

On Rails3.0, 'match' needs before resources.

  • Participants
  • Parent commits 8a06293

Comments (0)

Files changed (1)

File config/routes.rb

                          :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 => /.*/,
   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',