mirror of
https://github.com/we-promise/sure.git
synced 2026-04-25 06:54:07 +00:00
AI chat layout skeleton
This commit is contained in:
17
app/controllers/chats_controller.rb
Normal file
17
app/controllers/chats_controller.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
class ChatsController < ApplicationController
|
||||
def index
|
||||
Current.user.update!(current_chat: nil)
|
||||
@chats = Current.user.chats.ordered
|
||||
end
|
||||
|
||||
def create
|
||||
@chat = Current.user.chats.create_with_defaults!
|
||||
|
||||
redirect_to chat_path(@chat)
|
||||
end
|
||||
|
||||
def show
|
||||
@chat = Current.user.chats.find(params[:id])
|
||||
Current.user.update!(current_chat: @chat)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user