We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cbd28a2 commit 242e73cCopy full SHA for 242e73c
app/models/concerns/turbo/broadcastable.rb
@@ -310,9 +310,9 @@ def broadcast_rendering_with_defaults(options)
310
options.tap do |o|
311
# Add the current instance into the locals with the element name (which is the un-namespaced name)
312
# as the key. This parallels how the ActionView::ObjectRenderer would create a local variable.
313
+ o[:locals] = (o[:locals] || {}).reverse_merge!(model_name.element.to_sym => self)
314
# if the html or inline options are passed it will skip setting a partial from #to_partial_path
315
unless o.include?(:html) || o.include?(:inline)
- o[:locals] = (o[:locals] || {}).reverse_merge!(model_name.element.to_sym => self)
316
o[:partial] ||= to_partial_path
317
end
318
0 commit comments