-
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
Mongoid embedded document boolean selector does not work #3554
Comments
I've resolved the issue locally and created a PR with my fix here: #3555 I know your contributions page requests specs for the issue however I followed the contributions guide to setup and run specs locally and they're all failing with:
feel free to update the PR to meet your requirements |
Please refer to CONTRIBUTING.md, which got updated recently. |
Sorry it's been so long since I updated this. Finally had some time to work on the specs |
Fixed by #3555. |
Describe the bug
When a mongoid document has an embedded class the boolean selector doesn't work on new or edit
Reproduction steps
Create mongoid class with embedded document
Embedded document needs to have a Mongoid::Boolean field
Add the embedded document in accepts_nested_attributes_for
Open edit or create for the parent document in rails admin
Clicking any of the buttons for the boolean won't change your selection
Expected behavior
Clicking the buttons will change the selection
Additional context
Digging into the html it seems to be that the label field has an incorrect for value:
What rails admin creates:
What it should be:
manually updating that label tag for attribute via admin tools fixes the problem.
rails
version: 6.1.6.1rails_admin
version: 3.0.0mongoid
version: 7.5.1The text was updated successfully, but these errors were encountered: