From c0befbd02559591b0c2871ea9cef1e4d913b9ef6 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 11 Nov 2024 22:45:05 +0100 Subject: Allow searching from a given tag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This feature is useful if you want to have a quick search on how many resources apply for a single tag. Signed-off-by: Miquel Sabaté Solà --- config/routes.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/routes.rb b/config/routes.rb index fe9ee96..1f1df38 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -12,7 +12,10 @@ Rails.application.routes.draw do resource :exports, only: %i[new show] end - resources :tags + resources :tags do + get 'search' => 'tags#search' + end + resources :things, except: %i[index] do resources :comments, only: %i[create update destroy] end -- cgit v1.2.3