Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. Rails.application.routes.draw do
  2.  
  3. resources :users
  4. get '/without_team', to: 'users#without'
  5. post '/create_team', to: 'users#start_team'
  6. post '/join_team', to: 'users#join_team'
  7. get '/help', to: 'users#user_help'
  8.  
  9. resources :team
  10. post 'team/:id/submit', to: 'team#submit', as: "submit_team"
  11. post 'team/:id/unsubmit', to: 'team#unsubmit', as: "unsubmit_team"
  12. get 'teamlist', to: 'team#list', as: "team_list"
  13.  
  14. get 'login', to: 'session#new'
  15. post 'login', to: 'session#create'
  16. get 'logout', to: 'session#destroy'
  17.  
  18. get 'auth/:provider/callback', to: 'session#create'
  19. get 'auth/failure', to: redirect('/')
  20.  
  21. resources :admins
  22. get '/admin/approve_team', to: 'admins#approve'
  23. get '/admin/disapprove_team', to: 'admins#disapprove'
  24. get '/admin/undo_approve_team', to: 'admins#undo_approve'
  25. get '/admin/superadmin', to: 'admins#superadmin', as: "superadmin"
  26. get '/admin/reset_semester', to: 'admins#reset_semester', as: "reset_semester"
  27. post '/admin/reset_database', to: 'admins#reset_database', as: "reset_database"
  28. patch '/admin/transfer', to: 'admins#transfer', as: 'admin_transfer'
  29. patch '/admin/delete', to: 'admins#delete', as: 'admin_delete'
  30. get '/admin/tutorial', to: 'admins#admin_tutorial'
  31. get '/admin/download', to: 'admins#download'
  32.  
  33. post '/admin/email', to: "admins#team_list_email", as: 'admins_email'
  34.  
  35. get '/download_team_info', to: "file#download_approved_teams"
  36.  
  37. get '/discussion/edit', to: "discussion#edit_index", as: "edit_discussion_index"
  38.  
  39. post '/discussion/edit', to: "discussion#edit_index_post"
  40.  
  41. post '/discussion/edit_index', to:'discussion#edit_disc', as: "edit_discussion_post"
  42.  
  43. resources :discussion
  44.  
  45. resources :submissions
  46.  
  47. root 'session#new'
  48.  
  49. # TODO: something for route not found
  50. mount JasmineRails::Engine => '/specs' if defined?(JasmineRails)
  51. get "*path", to: redirect("/")
  52.  
  53.  
  54. # The priority is based upon order of creation: first created -> highest priority.
  55. # See how all your routes lay out with "rake routes".
  56.  
  57.  
  58. # Example of regular route:
  59. # get 'products/:id' => 'catalog#view'
  60.  
  61. # Example of named route that can be invoked with purchase_url(id: product.id)
  62. # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
  63.  
  64.  
  65. # Example resource route with options:
  66. # resources :products do
  67. # member do
  68. # get 'short'
  69. # post 'toggle'
  70. # end
  71. #
  72. # collection do
  73. # get 'sold'
  74. # end
  75. # end
  76.  
  77. # Example resource route with sub-resources:
  78. # resources :products do
  79. # resources :comments, :sales
  80. # resource :seller
  81. # end
  82.  
  83. # Example resource route with more complex sub-resources:
  84. # resources :products do
  85. # resources :comments
  86. # resources :sales do
  87. # get 'recent', on: :collection
  88. # end
  89. # end
  90.  
  91. # Example resource route with concerns:
  92. # concern :toggleable do
  93. # post 'toggle'
  94. # end
  95. # resources :posts, concerns: :toggleable
  96. # resources :photos, concerns: :toggleable
  97.  
  98. # Example resource route within a namespace:
  99. # namespace :admin do
  100. # # Directs /admin/products/* to Admin::ProductsController
  101. # # (app/controllers/admin/products_controller.rb)
  102. # resources :products
  103. # end
  104.  
  105. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement