24 lines
443 B
Plaintext
24 lines
443 B
Plaintext
- if @room
|
|
%h4= @room.name
|
|
|
|
= turbo_stream_from @room
|
|
.contain
|
|
#messages
|
|
= render @messages
|
|
- if current_user.signed_in?
|
|
= render partial: 'layouts/new_message_form'
|
|
- else
|
|
= link_to "Sign in", new_session_path(current_user)
|
|
to join the chat
|
|
|
|
.contain
|
|
%h1 Rooms index
|
|
|
|
- if policy(Room).new?
|
|
= render partial: "layouts/new_room_form"
|
|
|
|
= turbo_stream_from "rooms"
|
|
#rooms
|
|
%div
|
|
= render @rooms
|