Method: Turbo::Streams::TagBuilder#append

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

#append(target, content = nil, **rendering, &block) ⇒ Object

Append to the target in the dom identified with target 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 content as a record. Examples:

<%= turbo_stream.append "clearances", "<div id='clearance_5'>Append this to .clearances</div>" %>
<%= turbo_stream.append "clearances", clearance %>
<%= turbo_stream.append "clearances", partial: "clearances/unique_clearance", locals: { clearance: clearance } %>
<%= turbo_stream.append "clearances" do %>
  <div id='clearance_5'>Append this to .clearances</div>
<% end %>


189
190
191
# File 'app/models/turbo/streams/tag_builder.rb', line 189

def append(target, content = nil, **rendering, &block)
  action :append, target, content, **rendering, &block
end