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

Could not do mapping when using .find_or_initialize_by(enum: 'enum_value') #27

Open
zdraganov opened this issue Oct 9, 2015 · 0 comments

Comments

@zdraganov
Copy link

I reached a problem when doing

Model.find_or_initialize_by(enum_field: 'value')

it's not matching it.
I saw that if I use _enum_field instead of enum_field it's working as expected.

My environment is:
ruby (2.1.6)
rails (3.2.15)
mongoid (3.1.6)
mongoid-enum (0.1.1)

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

No branches or pull requests

1 participant