When I use Ecto.Enum.values
in a select/4
function, how to translate the values inside the ecto schema?
e.g.
field :animal, Ecto.Enum, values: [:cat: 1, :elephant: 2]
When I use Ecto.Enum.values
in a select/4
function, how to translate the values inside the ecto schema?
e.g.
field :animal, Ecto.Enum, values: [:cat: 1, :elephant: 2]