You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm glad I found this module since from my point of view it fills a gap in Elixir - ensure that different modules refer to the same values and don't use atoms like "magic numbers" that hopefully match.
There's just one extension I'd consider useful, for example to be used with Ecto's validate_inclusion() function. If all values (and keys) of an enum could be retrieved for an enum it would avoid the necessity to define an extra constant for this list (as shown in the sample code).
Any opinions on this?
The text was updated successfully, but these errors were encountered:
I'm glad I found this module since from my point of view it fills a gap in Elixir - ensure that different modules refer to the same values and don't use atoms like "magic numbers" that hopefully match.
There's just one extension I'd consider useful, for example to be used with Ecto's validate_inclusion() function. If all values (and keys) of an enum could be retrieved for an enum it would avoid the necessity to define an extra constant for this list (as shown in the sample code).
Any opinions on this?
The text was updated successfully, but these errors were encountered: