diff --git a/config/routes.rb b/config/routes.rb index 7d9254f..b43c79b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -199,9 +199,9 @@ 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 => /.*/ - map.connect 'attachments/download/:id/:filename', :controller => 'attachments', :action => 'download', :id => /\d+/, :filename => /.*/ - map.connect 'attachments/download/:id', :controller => 'attachments', :action => 'download', :id => /\d+/ + 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}