gjaldon / ecto_enum

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

Fix usage for list of strings and add some bang functions #110

Open manuel-rubio opened 4 years ago

manuel-rubio commented 4 years ago

The following example in README.md was incorrect:

use EctoEnum, "one", "two", "three"

But even the correct one was not working:

use EctoEnum, ["one", "two", "three"]

I moved the check from defenum to be in use for EctoEnum.Use module and now it's working correctly.

In the same way I missed a couple of functions I usually use like cast!/1 and dump!/1. Both were added as well.