Method: Turbo::Streams::TagBuilder#after

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

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

Insert the content passed in, a rendering result determined by the rendering keyword arguments, the content in the block, or the rendering of the target as a record after the target in the dom. Examples:

<%= turbo_stream.after "clearance_5", "<div id='clearance_6'>Insert after the dom target identified by clearance_5</div>" %>
<%= turbo_stream.after clearance %>
<%= turbo_stream.after clearance, partial: "clearances/clearance", locals: { title: "Hello" } %>
<%= turbo_stream.after "clearance_5" do %>
  <div id='clearance_6'>Insert after the dom target identified by clearance_5</div>
<% end %>


134
135
136
# File 'app/models/turbo/streams/tag_builder.rb', line 134

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