Last active
          March 28, 2017 09:31 
        
      - 
      
 - 
        
Save Systho/37ed59e66706be5d834e to your computer and use it in GitHub Desktop.  
    routing concern on collection
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Rails.application.routes.draw do | |
| concern :archivable do | |
| scope module: parent_resource.plural do | |
| resources :archiving, only: [:create, :destroy] | |
| end | |
| end | |
| resources :clients , concerns: [ :archivable ] | |
| resources :coaches , concerns: [ :archivable ] | |
| end | |
| end | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | client_archiving_index POST /clients/:client_id/archiving(.:format) front/clients/archiving#create | |
| client_archiving DELETE /clients/:client_id/archiving/:id(.:format) front/clients/archiving#destroy | |
| ... | |
| coach_archiving_index POST /coaches/:coach_id/archiving(.:format) front/coaches/archiving#create | |
| coach_archiving DELETE /coaches/:coach_id/archiving/:id(.:format) front/coaches/archiving#destroy | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment