Method: Turbo::Streams::TagBuilder#update_all

Defined in:
app/models/turbo/streams/tag_builder.rb

#update_all(targets, content = nil, method: nil, **rendering, &block) ⇒ Object

Update the targets in the dom with either the content passed in or a rendering result determined by the rendering keyword arguments, the content in the block, or the rendering of the targets as a record. Examples:

<%= turbo_stream.update_all "clearance_item", "Update the content of the dom target identified by the class clearance_item" %>
<%= turbo_stream.update_all clearance %>
<%= turbo_stream.update_all clearance, partial: "clearances/new_clearance", locals: { title: "Hello" } %>
<%= turbo_stream.update_all "clearance_item" do %>
  Update the content of the dom target identified by the class clearance_item
<% end %>
<%= turbo_stream.update_all clearance, "<div>Morph the dom target</div>", method: :morph %>


175
176
177
# File 'app/models/turbo/streams/tag_builder.rb', line 175

def update_all(targets, content = nil, method: nil, **rendering, &block)
  action_all :update, targets, content, method: method, **rendering, &block
end