allow dom_id method to accept an array of records_or_classes - #50608
Closed
jwilsjustin wants to merge 1 commit into
Closed
allow dom_id method to accept an array of records_or_classes#50608jwilsjustin wants to merge 1 commit into
jwilsjustin wants to merge 1 commit into
Conversation
Member
|
Related: #44081 |
ref: https://discuss.rubyonrails.org/t/allow-dom-id-method-to-accept-multiple-ids-models/84408 If the first argument (records_or_classes) is an array, this change will loop through each value and form a singular dom id, then join the parts together. This change will allow turbo frame tags to accept multiple models (similar to the `cache` helper from ActionView). ``` <%= turbo_frame_tag [customer, field] do %> <!-- code --> <% end %> ``` See also: hotwired/turbo-rails#476
jwilsjustin
force-pushed
the
multi-model-dom-id
branch
from
January 8, 2024 14:17
3538701 to
6ea12c3
Compare
Merged
4 tasks
Member
|
Closed by #55204 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
See also: hotwired/turbo-rails#476
hotwired/turbo-rails/pull/476 removed the ability to pass multiple ids/models to the
turbo_frame_taghelper method. In that PR it was suggested by @skipkayhil that this ability be passed down to thedom_idmethod (which is a part of rails core) method rather than theturbo_frame_taghelper (which is a part of turbo-rails).ref: https://discuss.rubyonrails.org/t/allow-dom-id-method-to-accept-multiple-ids-models/84408
Changes
If the first argument of the
dom_idis an array, this change will loop through each value and form a singular dom ID, then join the parts together. This change will allow turbo frame tags to accept multiple models (similar to thecachehelper from ActionView).[Fix #issue-number]