instance method
broadcast_rendering_with_defaults
Ruby on Rails 1.3.3
Since v1.3.3 Last seen in v2.0.23 PrivateSignature
broadcast_rendering_with_defaults(options)
No documentation comment.
Parameters
-
optionsreq
Source
# File app/models/concerns/turbo/broadcastable.rb, line 333
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)
# if the html option is passed in it will skip setting a partial from #to_partial_path
unless o.include?(:html)
o[:partial] ||= to_partial_path
end
end
end
Defined in app/models/concerns/turbo/broadcastable.rb line 333
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Turbo::Broadcastable