Packages

An Elixir Ecto Package to Boost Your Productivity and Achieve 90% throughput in Just 10% of the Time.

Current section

Files

Jump to
ecto_entity lib entity helpers.ex
Raw

lib/entity/helpers.ex

defmodule Ecto.Entity.Helpers do
@doc """
Get the repo to use
"""
def app_name, do: Application.get_env(:ecto_entity, :app_name)
def get_repo do
Application.get_env(app_name(), :ecto_repos, [])
|> case do
[repo] -> repo
_ -> raise "Multiple repos are not supported right now."
end
end
end