Skip to content

Commit

Permalink
Wire up route for enqueuing category suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
CoralineAda committed Oct 30, 2024
1 parent d320ab2 commit 94e806d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/controllers/categories_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ def update
end
end

def enqueue_category_suggestions

end

private

def category_params
Expand Down
2 changes: 1 addition & 1 deletion app/views/categories/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<% if @enqueued_at %>
<p>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.</p>
<% 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" %>
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 94e806d

Please sign in to comment.