-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolved a problem with embedded mongoid documents and boolean selectors #3555
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.
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.
@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 |
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 |
I can handle the rest. Thank you! |
Reuse content column instead of adding a new boolean one, as modifying an old migration doesn't change existing databases
* '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
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.