instance method
convert_to_turbo_stream_dom_id
Ruby on Rails 2.0.23
Since v1.3.3 Last seen in v2.0.23 PrivateSignature
convert_to_turbo_stream_dom_id(target, include_selector: false)
No documentation comment.
Parameters
-
targetreq -
include_selectorkey = 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