I have the following expression in Ruby:
env = opts.env || "staging"
How to record it in Elixir?
EDIT:
This expression in Elixir will not work:
case Repo.insert(changeset) do {:ok, opts} -> env = opts.env || "staging"
Error:
** (KeyError) key :env not found in: %Myapp.App{__meta__: #Ecto.Schema.Metadata<:loaded>
source share