Method: Turbo::Streams::TagBuilder#action

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

#action(name, target, content = nil, method: nil, allow_inferred_rendering: true, **rendering, &block) ⇒ Object

Send an action of the type name to target. Options described in the concrete methods.



248
249
250
251
252
# 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