diff --git a/config/routes.rb b/config/routes.rb --- a/config/routes.rb +++ b/config/routes.rb @@ -37,6 +37,10 @@ end resources :submissions do + member do + get 'download' + get 'compiler_msg' + end collection do get 'prob/:problem_id', to: 'submissions#index', as: 'problem' get 'direct_edit_problem/:problem_id', to: 'submissions#direct_edit_problem', as: 'direct_edit_problem' @@ -44,9 +48,9 @@ end end - match 'tasks/view/:file.:ext' => 'tasks#view' - match 'tasks/download/:id/:file.:ext' => 'tasks#download' - match 'heartbeat/:id/edit' => 'heartbeat#edit' + get 'tasks/view/:file.:ext' => 'tasks#view' + get 'tasks/download/:id/:file.:ext' => 'tasks#download' + get 'heartbeat/:id/edit' => 'heartbeat#edit' #main get "main/list" @@ -63,11 +67,11 @@ get 'graders/list', to: 'graders#list', as: 'grader_list' - match 'heartbeat/:id/edit' => 'heartbeat#edit' + get 'heartbeat/:id/edit' => 'heartbeat#edit' # See how all your routes lay out with "rake routes" # This is a legacy wild controller route that's not recommended for RESTful applications. # Note: This route will make all actions in every controller accessible via GET requests. - match ':controller(/:action(/:id))(.:format)' + match ':controller(/:action(/:id))(.:format)', via: [:get, :post] end