Sean Harmer

Joined

1,830 Experience
18 Lessons Completed
0 Questions Solved

Activity

Posted in Realtime Nested Comments: Part 3 Discussion

There's a bug in ActiveStorage. Wrap your call in url_for() to work around it.

# BUG: Uses http://example.com/... when rendering via a model broadcast
# See https://github.com/rails/rails/issues/41795
url_for(obj.avatar.variant(resize: "#{size}x#{size}!"))

Posted in Realtime Nested Comments: Part 2 Discussion

Hey Chris, thanks for the video! I'm just wondering about the design decision to have a stream subscription for each individual comment for the broadcast removal vs broadcasting to the "container" comments stream along with the id of the comment to remove.

Is there a reason for doing it this way? Wondering if this would scale to a page with 1000 comments for example. Would that require 1001 websocket connections?

Posted in Designing & Building the Noticed gem Discussion

Nice overview of the techniques. Thanks!

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

© 2024 GoRails, LLC. All rights reserved.