quick tip for iex in phoenix project
when you're developing in a phoenix project, you may need to use console (iex -S mix
) to try something ecto query like rails console, you can create a file (.iex.exs) in project folder. and puts something like this in that file.
import Ecto.{Query, Changeset}
alias Pragmatic.Repo
alias Pragmatic.Items.Item
then in console, you don't need to type full path.
Written by fang
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Elixir
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#