instance method
prepend_all
Ruby on Rails 1.5.0
Since v1.3.3 Last seen in v2.0.23Signature
prepend_all(targets, content = nil, **rendering, &block)
Prepend to the targets in the dom identified with targets either the content passed in or a rendering result determined by the rendering keyword arguments or the content in the block, or the rendering of the content as a record. Examples:
<%= turbo_stream.prepend_all ".clearances", "<div class='clearance_item'>Prepend this to .clearances</div>" %>
<%= turbo_stream.prepend_all ".clearances", clearance %>
<%= turbo_stream.prepend_all ".clearances", partial: "clearances/new_clearance", locals: { clearance: clearance } %>
<%= turbo_stream.prepend_all ".clearances" do %>
<div class='clearance_item'>Prepend this to .clearances</div>
<% end %>
Parameters
-
targetsreq -
contentopt = nil -
renderingkeyrest -
blockblock
Source
# File app/models/turbo/streams/tag_builder.rb, line 209
def prepend_all(targets, content = nil, **rendering, &block)
action_all :prepend, targets, content, **rendering, &block
end
Defined in app/models/turbo/streams/tag_builder.rb line 209
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Turbo::Streams::TagBuilder