From 5d982fd3f1efb8e0bcc96498ac7212f2c780d07e Mon Sep 17 00:00:00 2001 From: "Stanko K.R." Date: Mon, 11 Aug 2025 14:48:02 +0200 Subject: [PATCH] Remove unused route --- app/controllers/conversations_controller.rb | 16 ---------------- config/routes.rb | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/app/controllers/conversations_controller.rb b/app/controllers/conversations_controller.rb index f76bbc824..cf18e1281 100644 --- a/app/controllers/conversations_controller.rb +++ b/app/controllers/conversations_controller.rb @@ -1,21 +1,5 @@ class ConversationsController < ApplicationController - def create - Current.user.resume_or_start_conversation(question_params[:conversation][:question]) - redirect_to conversation_path, status: :see_other - end - def show @conversation = Current.user.conversation - - @messages = if params[:before] - @conversation.messages.page_before(params[:before]) - else - @conversation.messages.last_page - end end - - private - def conversation_params - params.require(:conversation).permit(:question) - end end diff --git a/config/routes.rb b/config/routes.rb index ff9e4d618..06e365277 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -115,7 +115,7 @@ Rails.application.routes.draw do end end - resource :conversation, only: %i[ show create ] do + resource :conversation, only: %i[ show ] do scope module: :conversations do resources :messages, only: %i[ index create ] end