ecto_enum
ecto_enum copied to clipboard
Make it configurable to return either string or atom
Right now, we just return atoms whenever we call user.status. We could accept an option in defenum so that user.status will return either string or atom instead.
👍
Any updates on that?
Our project uses both ecto_enum and exnumerator to get different types of value depending on what you defined.
you can have a try.
Would be also helpful to get either the string or the integer as it is stored in the database. Especially in Ecto select.
https://stackoverflow.com/questions/57726255/use-enum-ecto-types-as-strings-not-atoms-elixir
any help?