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

bugfix: form_value use enum value not the key in active_record #2659

Conversation

dskyu
Copy link

@dskyu dskyu commented Jun 23, 2016

when i use enum feature in my active record, the value of the select in form is '' because the value option of the select is enum's value not the key.
eg: there is a Product model with enum status: {spare: 1, on_sale: 2, off_sale: 3}
without this commit,
image the status field is always null, because rails_admin form builder can't find the correct value for the select
with this commit,
image
it will find the correct value, so the select value will be filled correctly

@luizpicolo
Copy link
Contributor

This is fixed my error. Thanks.

@mshibuya mshibuya closed this in 33342c0 Sep 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants