aboutsummaryrefslogtreecommitdiffstats
path: root/config/routes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb19
1 files changed, 13 insertions, 6 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 19d6a03..b547a66 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,15 +1,22 @@
Rails.application.routes.draw do
- resources :snippets
- # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
+ resources :snippets, only: [:new, :create, :update, :show], path: "", path_names: {
+ new: "",
+ create: "create",
+ update: ":id",
+ show: ":id"
+ }
+
+ post "results/run" => "results#run"
+ get "results/:id" => "results#show"
# Serve websocket cable requests in-process
# mount ActionCable.server => "/cable"
- root to: "snippets#new"
+ #root to: "snippets#new"
- post "/create" => "snippets#create"
- put "/update" => "snippets#update"
- get "/:id" => "snippets#show", constraints: { id: /[1-9][0-9]*/ }
+ #post "/create" => "snippets#create"
+ #put "/update" => "snippets#update"
+ #get "/:id" => "snippets#show", constraints: { id: /[1-9][0-9]*/ }
match "*any" => "application#not_found", via: :all
end