From 20c92cbb20db63d4e1215bcdb2edb11e2b899d3a Mon Sep 17 00:00:00 2001 From: madhums Date: Tue, 27 Feb 2024 22:33:42 +0100 Subject: [PATCH] remove unused routes No unused routes found. gives a list of unused routes. Using this, remove any routes that are not needed --- config/routes.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 75e54fb..a348e5a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -9,9 +9,9 @@ match "search" => "stories#search", :via => %i[get post], :as => :search delete "remove_documents/:id" => "stories#remove_documents", :as => :remove_documents end - resources :story_updates, as: :updates, shallow: true, shallow_prefix: "story" + resources :story_updates, as: :updates, shallow: true, shallow_prefix: "story", except: %i[show index] resources :discussions, shallow: true do - resources :posts + resources :posts, except: %i[show index] end end get "stories/:story_id/discussions/:id", to: "discussions#show", as: :story_discussion