ruby on rails - Nested Resource Routing -


resources :patients  collection    'new_import'    post 'import'  end 

how can have following urls?

/patients/import (get) -->action: new_import  /patients/import (post) --> action: import 

right urls are:

/patients/new_import (get) -->action: new_import  /patients/import (post) --> action: import 

i must able without doing:

 match 'patients/import' => 'patients#new_import', :via => :get  match 'patients/import' => 'patients#import', :via => :post 

 resources :patients   collection      'import' => :new_import     post 'import' => :import   end end 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -