Direct Messages In Realtime Chat App With Ruby On Rails 7 Chatroom | Turbo Tutorial Part 2

  Рет қаралды 9,096

Deanin

Deanin

Күн бұрын

Пікірлер: 23
@Deanin
@Deanin 2 жыл бұрын
This is part 2 and covers private chats/direct messages/whispers between users. You can see the full playlist here: kzbin.info/aero/PL3mtAHT_eRex1sJI2uoTBgFT3qAXFbEcy Next time we look forward to Stimulus and User Avatars. Hope this helps!
@SandroTerra1
@SandroTerra1 2 жыл бұрын
Your tutorials are amazing! I had never programmed before. But now, I'm moving forward and achieving the goal. My most sincere thanks! Hugs from Brazil!
@littlenikola
@littlenikola 2 жыл бұрын
Amazing tutorial so far, everything is clear to understand and the project is really fun
@nikitasemenov3128
@nikitasemenov3128 2 жыл бұрын
Thanks for sharing and keep going!
@ppavelcars
@ppavelcars 2 жыл бұрын
Amazing tutorial! Thank you, Deanin!
@Deanin
@Deanin 2 жыл бұрын
Thank you! Glad it was helpful!
@leizhang6839
@leizhang6839 2 жыл бұрын
Hey body, thanks for sharing!
@l.henriquef4033
@l.henriquef4033 2 жыл бұрын
you are the best!
@Deanin
@Deanin 2 жыл бұрын
Thanks! Hope this helps :)
@angelconcha7376
@angelconcha7376 Жыл бұрын
I wanted to thank you for your awesome work! It helped me alot. I also wanted to ask you, how come i cant see my messages once I send them unless I refresh the page :(( It was working just fine until now. Thanks again
@DefCantGame
@DefCantGame 2 жыл бұрын
Am I the only one that would love to see Dean do a Rails 7 version of a wordpress competitor or something like permissions, roles, content. Love the content
@Deanin
@Deanin 2 жыл бұрын
No I'm sure you're not the only one, so I'll add it to the list! 😀
@DefCantGame
@DefCantGame 2 жыл бұрын
@@Deanin Would be greatly appreciated as someone who does mostly Django and Laravel but been following your videos feels like thats another good real world use case. Love the detail/explanations, keep it up!
@PAOLASAVAL-d1l
@PAOLASAVAL-d1l Жыл бұрын
Can you make a tutorial for a chat between client and workers? i believe is call a chat widget
@kafuprfin
@kafuprfin Жыл бұрын
its need a little JS and chat is done!
@stoianstoianov9481
@stoianstoianov9481 2 жыл бұрын
Nice tutorial! How can we authorize access to private messages just for two users and restrict third one to view the room ?
@ShimolKhan-y7d
@ShimolKhan-y7d Жыл бұрын
How can we reset the room input form field and message input form field after submission? Tried several times, but failing.
@rohitkamalapur1452
@rohitkamalapur1452 2 жыл бұрын
I have followed the same but when I do direct message to a particular user the same message shows in all the other rooms. can you help me where did I go wrong . thanks in advance....
@DevBishwasBh
@DevBishwasBh 2 жыл бұрын
How to detect if current user is actual current_user for edit/delete feature with broadcast?
@Deanin
@Deanin 2 жыл бұрын
If you're broadcasting from the controller, it only should be fine without a check. If the broadcast happens in the model, I think the officially recommended choices are either: Do a client side check with JavaScript to hide the buttons if you aren't the current user or an admin or Create a channel on your index page that has a turbo_stream_from "#{current_user.id}" and then in your model you'll be able to broadcast to that channel and only that user will get it. So that channel would be specifically the edit and delete buttons that are then added to the messages with a partial. You'd then have to make sure that the other channel gets messages without the edit and delete button, so that everyone gets the messages once. It sucks because as I'm sure you've noticed, turbo broadcasts don't let you check who the current user is. Drives me nuts lol
@DevBishwasBh
@DevBishwasBh 2 жыл бұрын
@@Deanin I just create a input field (with current_user.id let's say: input_current_user)specifically inside the comment section and whenever someone comments, and the stuff gets broadcast, and stimulus js check the comment.user value with the input_current_user, and returns the stuff. I just wanna confirm if hiding delete button with js is a secure way to do it?
@Deanin
@Deanin 2 жыл бұрын
Yeah it's secure as long as you do a check in your controller to make sure the user has permissions. So inside or before the delete action, check to make sure the message.user == current_user That way if they do manage to send the right info to the backend or unhide anything you've hidden, your backend still won't do anything.
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
Ruby on Rails in 100 Seconds
3:33
Fireship
Рет қаралды 489 М.
Making A Chatroom (Speedrun) | Ruby On Rails 7
22:14
Deanin
Рет қаралды 3,4 М.
Rails 7: The Demo
34:15
David Heinemeier Hansson
Рет қаралды 109 М.
Google’s Quantum Chip: Did We Just Tap Into Parallel Universes?
9:34
Ruby in 100 Seconds
2:37
Fireship
Рет қаралды 866 М.
Ruby on Rails Hotwire + Turbo for Beginners
17:11
Malachi Rails
Рет қаралды 4,9 М.
The First Amiga Virus - Something Wonderful Has Happened
17:05
Modern Vintage Gamer
Рет қаралды 83 М.
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН