instance method convert_to_turbo_stream_dom_id

Ruby on Rails 2.0.23

Since v1.3.3 Last seen in v2.0.23 Private

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

Signature

convert_to_turbo_stream_dom_id(target, include_selector: false)

No documentation comment.

Parameters

target req
include_selector key = false
Source
# File app/helpers/turbo/streams/action_helper.rb, line 49
    def convert_to_turbo_stream_dom_id(target, include_selector: false)
      target_array = Array.wrap(target)
      if target_array.any? { |value| value.respond_to?(:to_key) || value.is_a?(Class) }
        "#{"#" if include_selector}#{ActionView::RecordIdentifier.dom_id(*target_array)}"
      else
        target
      end
    end

Defined in app/helpers/turbo/streams/action_helper.rb line 49 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Turbo::Streams::ActionHelper

Type at least 2 characters to search.

↑↓ navigate · open · esc close