Class: Layered::Assistant::Public::Panel::ConversationsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- ApplicationController
- Layered::Assistant::Public::Panel::ConversationsController
- Includes:
- StoppableResponse
- Defined in:
- app/controllers/layered/assistant/public/panel/conversations_controller.rb
Instance Method Summary collapse
Methods included from StoppableResponse
Instance Method Details
#create ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'app/controllers/layered/assistant/public/panel/conversations_controller.rb', line 19 def create @conversation = @assistant.conversations.new(name: Conversation.default_name) if @conversation.save add_conversation_to_session(@conversation) redirect_to layered_assistant.public_panel_conversation_path(@conversation) else render :new, status: :unprocessable_entity end end |
#index ⇒ Object
13 14 |
# File 'app/controllers/layered/assistant/public/panel/conversations_controller.rb', line 13 def index end |
#new ⇒ Object
16 17 |
# File 'app/controllers/layered/assistant/public/panel/conversations_controller.rb', line 16 def new end |
#show ⇒ Object
30 31 32 |
# File 'app/controllers/layered/assistant/public/panel/conversations_controller.rb', line 30 def show @messages = @conversation..includes(:model).by_created_at end |