instance method after

Ruby on Rails 1.5.0

Since v1.3.3 Last seen in v2.0.23

Available in: v1.3.3 v1.4.0 v1.5.0 v2.0.23

Signature

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

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 %>

Parameters

target req
content opt = nil
rendering keyrest
block block
Source
# File app/models/turbo/streams/tag_builder.rb, line 114
  def after(target, content = nil, **rendering, &block)
    action :after, target, content, **rendering, &block
  end

Defined in app/models/turbo/streams/tag_builder.rb line 114 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Turbo::Streams::TagBuilder

Type at least 2 characters to search.

↑↓ navigate · open · esc close