From 9415011b5fd192f1bafeaa9b6eacbb7921382a00 Mon Sep 17 00:00:00 2001 From: David Gay Date: Wed, 19 May 2021 22:53:38 -0400 Subject: Chat --- app/views/application/_chat.html.erb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'app/views/application') diff --git a/app/views/application/_chat.html.erb b/app/views/application/_chat.html.erb index 868986b..8abe73c 100644 --- a/app/views/application/_chat.html.erb +++ b/app/views/application/_chat.html.erb @@ -1,8 +1,13 @@ -
-
- Chat output will go here. +
+
- Chat input will go here. + <%= form_with model: ChatMessage.new, html: { autocomplete: "off" }, local: false, + data: { action: "chat#send" }, class: "flex" do |f| %> + <%= f.collection_select :chat_room_id, ChatRoom.accessible_to(current_char.user), + :id, :short_name, class: "flex-none" %> + <%= f.text_field :body, size: "1", maxlength: 255, required: true, + data: { chat_target: "message" }, class: "flex-grow inline-flex" %> + <% end %>
-- cgit v1.2.3