Closed WilHall closed 3 years ago
This pull request is related to the issue: https://github.com/danielberkompas/cloak_ecto/pull/11
Unsure of what the best solution is. But as it is now things will not work as documented with Ecto 3.5.
This should be fixed in https://github.com/danielberkompas/cloak_ecto/commit/2238af0359a79d145b9e60013afd8aba3478c3ac
Great! 👏
The
Cloak.Ecto.Type
module does not conform to theEcto.Type
behavior. For example,equal/3
is not implemented.Because of this, following the
cloak_ecto
usage instructions results in a custom Ecto type which does not conform to theEcto.Type
behavior. This can result inUndefinedFunctionError
instances when Ecto tries to use the custom type in a way that is not implemented:I believe either
Cloak.Ecto.Type
should be updated touse Ecto.Type
such that the default implementations can be used as fallbacks, or the usage instructions should be updated to let consumers ofuse Cloak.Ecto.Binary
know that they either need touse Ecto.Type
or define the missing methods.