instance method
update
Ruby on Rails 1.4.0
Since v1.3.3 Last seen in v2.0.23Signature
update(target, content = nil, **rendering, &block)
Update the target 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 target as a record. Examples:
<%= turbo_stream.update "clearance_5", "Update the content of the dom target identified by clearance_5" %>
<%= turbo_stream.update clearance %>
<%= turbo_stream.update clearance, partial: "clearances/unique_clearance", locals: { title: "Hello" } %>
<%= turbo_stream.update "clearance_5" do %>
Update the content of the dom target identified by clearance_5
<% end %>
Parameters
-
targetreq -
contentopt = nil -
renderingkeyrest -
blockblock
Source
# File app/models/turbo/streams/tag_builder.rb, line 140
def update(target, content = nil, **rendering, &block)
action :update, target, content, **rendering, &block
end
Defined in app/models/turbo/streams/tag_builder.rb line 140
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Turbo::Streams::TagBuilder