hotwired / turbo-rails

Use Turbo in your Ruby on Rails app
https://turbo.hotwired.dev
MIT License
2.13k stars 329 forks source link

v2.0.8 introduced issue where `broadcast_remove_to` requires `render: false` #679

Closed JamesChevalier closed 2 months ago

JamesChevalier commented 2 months ago

v2.0.8 and v2.0.9 contain an issue where broadcast_remove_to requires render: false

For example: after_destroy -> { broadcast_remove_to("#{user_id}-activities") } throws "ActionView::MissingTemplate: Missing partial" errors unless it's rewritten to after_destroy -> { broadcast_remove_to("#{user_id}-activities", render: false) }

Introduced in https://github.com/hotwired/turbo-rails/pull/511 Initial commit: https://github.com/hotwired/turbo-rails/commit/5d6e6042d4ff03c0418b7d37e43588f5106e22ec Rebase commit: https://github.com/hotwired/turbo-rails/commit/76f492a91085e127a9d0ab16e4be7bf1fce33b6a

Code in question: https://github.com/hotwired/turbo-rails/blob/5d6e6042d4ff03c0418b7d37e43588f5106e22ec/app/models/concerns/turbo/broadcastable.rb#L126-L133

seanpdoyle commented 2 months ago

@JamesChevalier thank you for opening this issue. I've opened https://github.com/hotwired/turbo-rails/pull/680 to attempt to resolve the underlying issue.