diff --git a/app/models/concerns/turbo/broadcastable.rb b/app/models/concerns/turbo/broadcastable.rb index 30e328b3..82c61145 100644 --- a/app/models/concerns/turbo/broadcastable.rb +++ b/app/models/concerns/turbo/broadcastable.rb @@ -523,7 +523,7 @@ def broadcast_rendering_with_defaults(options) options.tap do |o| # Add the current instance into the locals with the element name (which is the un-namespaced name) # as the key. This parallels how the ActionView::ObjectRenderer would create a local variable. - o[:locals] = (o[:locals] || {}).reverse_merge!(model_name.element.to_sym => self, request_id: Turbo.current_request_id).compact + o[:locals] = (o[:locals] || {}).reverse_merge!(model_name.element.to_sym => self).compact if o[:html] || o[:partial] return o diff --git a/test/dummy/app/views/messages/_message.html.erb b/test/dummy/app/views/messages/_message.html.erb index f92ff187..82446f43 100644 --- a/test/dummy/app/views/messages/_message.html.erb +++ b/test/dummy/app/views/messages/_message.html.erb @@ -1 +1,3 @@ -
<%= message %>
\ No newline at end of file +<%# locals: (message:, profile: nil) %> + +<%= message %>