when i run
iex -S mix phoenix.server
I would like to be able to run commands like:
iex(1) > Repo.all(MyModel)
However, this gives me this error:
(UndefinedFunctionError) undefined function: Repo.all/1 (module Repo is not available)
If I prefix my calls with my project name, it works:
iex(1) > ProjectName.Repo.all(ProjectName.MyModel)
How can I avoid the prefix of my calls with my project name in iex?
source
share