instance method
action
Ruby on Rails 2.0.23
Since v1.3.3 Last seen in v2.0.23Signature
action(name, target, content = nil, method: nil, allow_inferred_rendering: true, **rendering, &block)
Send an action of the type name to target. Options described in the concrete methods.
Parameters
-
namereq -
targetreq -
contentopt = nil -
methodkey = nil -
allow_inferred_renderingkey = true -
renderingkeyrest -
blockblock
Source
# File app/models/turbo/streams/tag_builder.rb, line 248
def action(name, target, content = nil, method: nil, allow_inferred_rendering: true, **rendering, &block)
template = render_template(target, content, allow_inferred_rendering: allow_inferred_rendering, **rendering, &block)
turbo_stream_action_tag name, target: target, template: template, method: method
end
Defined in app/models/turbo/streams/tag_builder.rb line 248
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Turbo::Streams::TagBuilder