Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turbo::Broadcastable#broadcasts broadcasts creates to model_name.plural stream #295

Merged
merged 1 commit into from
May 22, 2022

Conversation

Exterm1nate
Copy link
Contributor

@Exterm1nate Exterm1nate commented Jan 4, 2022

As mentioned in #171, Turbo::Broadcastable#broadcasts provides the stream for broadcasting creates that can't be on the page until the model instance is created.
The issue was closed without any conversation and I didn't find any topics at Hotwire forum about this problem.
My solution is to broadcast instance creation to stream with model plural name, which looks quite intuitive for me.

My apologies if i missed something.

@fig
Copy link
Contributor

fig commented Apr 5, 2022

Hey @Exterm1nate , Thanks for picking this up! I was he author of #171.

I didn't really know at the time whether I had a valid point, or I just didn't understand the Broadcastable module.

I'm happy that someone else has confirmed my suspicions and delighted that you have proposed a patch. 👍

@dhh
Copy link
Member

dhh commented May 22, 2022

Actually, I still don't fully understand why if you need an overwritten stream name that you don't just use broadcasts_to? That's explicitly what that's there for?

@dhh
Copy link
Member

dhh commented May 22, 2022

Ah, never mind. Finally see the problem when it was shown in #312.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants