Resolved a problem with embedded mongoid documents and boolean selectors#3555
Merged
Conversation
Previous implementation was creating a label with an incorrect for attribute when used on an embedded mongoid document. It would create <label for=parent_class[embedded_class_attributes]_field_name_1 ... when the id of the input field was parent_class_embedded_class_attributes_field_name_1. Because of this the selectors did nothing when clicked since the label references an id that does not exist. This change to using the rails label helper should safely create the label in all cases.
Member
|
Could you write a spec for this fix? |
|
This fix work. Have the bug with 3.1.2 too. Is not specific to mongo |
Previous implementation was creating a label with an incorrect for attribute when used on an embedded mongoid document. It would create <label for=parent_class[embedded_class_attributes]_field_name_1 ... when the id of the input field was parent_class_embedded_class_attributes_field_name_1. Because of this the selectors did nothing when clicked since the label references an id that does not exist. This change to using the rails label helper should safely create the label in all cases.
Contributor
Author
|
@mshibuya Are there any known random failures in the specs? According to the CI I've got failures on rails_6.1 and 7 but running those locally passes for me bundle exec appraisal rails-7.0 rspec |
Contributor
Author
|
Well reducing the js scope resolved some of my failures. Not sure what would cause the remaining one though any feedback here would be appreciated |
Member
|
I can handle the rest. Thank you! |
mshibuya
added a commit
that referenced
this pull request
Nov 25, 2023
Reuse content column instead of adding a new boolean one, as modifying an old migration doesn't change existing databases
jklimke
added a commit
to 3dcl/rails_admin
that referenced
this pull request
Nov 28, 2023
* 'master' of github.com:railsadminteam/rails_admin: Tidy up gemfiles Bump jRuby Test against Mongoid 8 Test against Rails 7.1 Mitigate jRuby build failures Upgrade node and vite to fix the vite build Un-pin turbo-rails to fix Rails 6.1 builds Follow-up for railsadminteam#3555 Resolved a problem with embedded mongoid documents and boolean selectors (railsadminteam#3555) Stop using update_only to decide to show subform on create (railsadminteam#3649) Follow-up for railsadminteam#3643 Basic vite integration attempt (railsadminteam#3643) Support client-side dynamic scoping Fix Rubocop offense Revive the live demo Unlock webrick version Fix typo: tripple ==> triple (railsadminteam#3637) Replace ” entity with inline <q> element (railsadminteam#3636) Vulnerability fix: validate return_to param using request.host (railsadminteam#3627) Fix Rubocop offense
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.
Previous implementation was creating a label with an incorrect for attribute when used on an embedded mongoid document. It would create <label for=parent_class[embedded_class_attributes]_field_name_1 ... when the id of the input field was parent_class_embedded_class_attributes_field_name_1. Because of this the selectors did nothing when clicked since the label references an id that does not exist. This change to using the rails label helper should safely create the label in all cases.