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

No support for explicitly mapped values #31

Open
maxschmeling opened this issue Jan 11, 2016 · 1 comment
Open

No support for explicitly mapped values #31

maxschmeling opened this issue Jan 11, 2016 · 1 comment

Comments

@maxschmeling
Copy link

I get an error when trying to map enum values explicitly (as can be done with ActiveRecord::Enum).

For example:

# see https://en.wikipedia.org/wiki/ISO/IEC_5218
enum :sex, {
  unknown: 0,
  male: 1,
  female: 2,
  not_applicable: 9
}

The error is in create_validations:

undefined method `to_sym' for [:unknown, 0]:Array
@utiq
Copy link

utiq commented Jul 11, 2019

Same, how can I do this?

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

2 participants