All threads / Group Chat with ActionCable: Part 6 Discussion
Ask A Question

Notifications

You’re not receiving notifications from this thread.

Group Chat with ActionCable: Part 6 Discussion

masud hossain ·

Wow! This was an amzing guide!

gorails0013 ·

https://github.com/gorails-...
Is it still safe if you input <script>alert("wow");</script> in the message body??

https://github.com/gorails-...
it seems the body is raw.

Isn't it why we always want to use controller's renderer? so that you can leave the worries like this behind?

Yeah, you'll want to sanitize it. I can't cover everything in the series, so that's one you'll have to add in. Good catch, it'll be useful for anyone else following this to be aware of that.

HI, I did the group chat on 5.2 and now I want to port it to a new rails 6 app in web pack. I got this error

teams.coffee:20 Uncaught ReferenceError: App is not defined

which is in teams.coffee line 20
App.teams.send_message(team_id, body.val())

where the file teams.coffee is app/Javascript/packs directory

any ideas ?

I'm going to update this series for Rails 6 really soon. Basically you just need to use a Javascript import to import the channel from if you're calling it from another file.

That would be great. Look forward.

Would be great to have a guide with rails 6 :D

I've been recording an update series in Rails 6 that should be out soon. :D

hello, i can't figure out how to unsubscribe from the chat?

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 69,840+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2023 GoRails, LLC. All rights reserved.