Commit 9d613e5
fix(message): render messages/_message partial in broadcasts
RubyLLM 1.14.1 added a `to_partial_path` override returning
"messages/<role>" (user/assistant/system/tool). With the bump from
1.11.0 in #102, turbo-rails' `broadcasts_to` stopped finding a partial
because the app only has a single role-aware `_message.html.erb`. Every
message save crashed Turbo::Streams::ActionBroadcastJob with
ActionView::MissingTemplate, silently breaking live chat UI updates for
subscribers (real chats, summaries, testimonials, translations).
Pin the broadcast partial explicitly. Added a regression test that
saves a Message with every role and asserts the enqueued broadcast job
renders cleanly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 6a04042 commit 9d613e5
2 files changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
18 | 30 | | |
0 commit comments