##// END OF EJS Templates
route: code layout clean up attachments route...
Toshi MARUYAMA -
r8258:adfb4f4b4cc7
parent child
Show More
@@ -224,9 +224,15 ActionController::Routing::Routes.draw do |map|
224
224
225 map.resources :attachments, :only => [:show, :destroy]
225 map.resources :attachments, :only => [:show, :destroy]
226 # additional routes for having the file name at the end of url
226 # additional routes for having the file name at the end of url
227 map.connect 'attachments/:id/:filename', :controller => 'attachments', :action => 'show', :id => /\d+/, :filename => /.*/, :conditions => {:method => :get}
227 map.connect 'attachments/:id/:filename', :controller => 'attachments',
228 map.connect 'attachments/download/:id/:filename', :controller => 'attachments', :action => 'download', :id => /\d+/, :filename => /.*/, :conditions => {:method => :get}
228 :action => 'show', :id => /\d+/, :filename => /.*/,
229 map.connect 'attachments/download/:id', :controller => 'attachments', :action => 'download', :id => /\d+/, :conditions => {:method => :get}
229 :conditions => {:method => :get}
230 map.connect 'attachments/download/:id/:filename', :controller => 'attachments',
231 :action => 'download', :id => /\d+/, :filename => /.*/,
232 :conditions => {:method => :get}
233 map.connect 'attachments/download/:id', :controller => 'attachments',
234 :action => 'download', :id => /\d+/,
235 :conditions => {:method => :get}
230
236
231 map.resources :groups, :member => {:autocomplete_for_user => :get}
237 map.resources :groups, :member => {:autocomplete_for_user => :get}
232 map.group_users 'groups/:id/users', :controller => 'groups', :action => 'add_users', :id => /\d+/, :conditions => {:method => :post}
238 map.group_users 'groups/:id/users', :controller => 'groups', :action => 'add_users', :id => /\d+/, :conditions => {:method => :post}
General Comments 0
You need to be logged in to leave comments. Login now