Closed jakub-zawislak closed 7 years ago
Protocols are consolidated at the moment iex is started. In order to play with protocols in console, you can disable it in project configuration, look here - https://hexdocs.pm/mix/Mix.Tasks.Compile.Protocols.html.
Also, try newer version of elixir, 1.4.5 give nice warning about it: warning: the Vex.Extract protocol has already been consolidated, an implementation for User has no effect
Did you define the module within iex
?
I created this module in a .ex
file, inside a Phoenix project. Phoenix was configured to refresh page after every change so I'm not restarting it, but I forgot to recompile/restart server before playing with vex in the console. My bad. But finally my issue solved! Thanks
This example from docs doesn't work https://github.com/CargoSense/vex#in-structs