From 94e806d76fe88803a42af6c3692c48fdc67e8134 Mon Sep 17 00:00:00 2001 From: CoralineAda Date: Wed, 30 Oct 2024 18:30:23 -0500 Subject: [PATCH] Wire up route for enqueuing category suggestion --- app/controllers/categories_controller.rb | 4 ++++ app/views/categories/index.html.erb | 2 +- config/routes.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb index e571777..47743f8 100644 --- a/app/controllers/categories_controller.rb +++ b/app/controllers/categories_controller.rb @@ -52,6 +52,10 @@ def update end end + def enqueue_category_suggestions + + end + private def category_params diff --git a/app/views/categories/index.html.erb b/app/views/categories/index.html.erb index f5dbcd8..d330390 100644 --- a/app/views/categories/index.html.erb +++ b/app/views/categories/index.html.erb @@ -19,7 +19,7 @@ <% if @enqueued_at %>

Category suggestions were requested at <%= @enqueued_at %>. Please allow up to 2 minutes for the process to complete. You can reload the page to monitor progress.

<% else %> - <%= button_to "Get Suggestions", codebook_enqueue_categories_path(@question.id, params: { enqueued: true }, method: :put ) %> + <%= button_to "Get Suggestions", codebook_enqueue_category_suggestions_path(@question.id, params: { enqueued: true }, method: :put ) %> <% end %> <%= render partial: "/shared/filtering" %> diff --git a/config/routes.rb b/config/routes.rb index 3e9893a..ae1ada0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -19,7 +19,7 @@ resources :themes resources :codebooks do - post "enqueue_categories", action: "enqueue_categories" + post "enqueue_category_suggestions", action: "enqueue_category_suggestions" end resources :questions do