Skip to content
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

Reset polymorphic id upon type change #3630

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KMinChrist
Copy link

Hi, thank you for your attention. Currently, for polymorphic association fields, the id persists after type is changed, which may be unclear to users and cause a bug if the id is selected before type. With this change, the id field can be reset each time the type field changes. I hope you can approve this merge request. Thank you!

@mshibuya
Copy link
Member

Thank you for the PR. The fix makes sense, could you add a test case to verify this?
https://github.com/railsadminteam/rails_admin/blob/master/spec/integration/fields/polymorphic_assosiation_spec.rb will be the best place to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants