gjaldon / ecto_enum

Ecto extension to support enums in models
MIT License
563 stars 131 forks source link

EctoEnum macro should implement embed_as/1 and equal?/2 #91

Closed Sgoettschkes closed 5 years ago

Sgoettschkes commented 5 years ago

After updating Ecto to 3.2.0, I get the following warnings for each use of EctoEnum:

warning: function embed_as/1 required by behaviour Ecto.Type is not implemented (in module Module.Enum)
  lib/namespace/module.ex:9: Module.Enum (module)

warning: function equal?/2 required by behaviour Ecto.Type is not implemented (in module Module.Enum)
  lib/namespace/module.ex:9: Module.Enum (module)

I guess to prevent this warnings from showing up changing the macro would be sufficient.

sheharyarn commented 5 years ago

Any update on this? I see that there already is a PR.