Created
May 28, 2019 17:29
-
-
Save talum/2ebe97b9f85907f8705cc8a6a3180f24 to your computer and use it in GitHub Desktop.
Changeset demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iex> attributes = %{amount_due: 3000, due_date: "2019-04-30", scheduled_send_date: "2019-04-25", | |
iex> closed_at: "2019-05-01"} | |
iex> changeset = Registrar.Billing.Invoice.changeset(%Invoice{}, attributes) | |
iex> #Ecto.Changeset< | |
action: nil, | |
changes: %{amount_due: 3000, due_date: ~D[2019-04-30], scheduled_send_date: ~D[2019-04-25]}, | |
errors: [], | |
data: #Registrar.Billing.Invoice<>, | |
valid?: true | |
> | |
iex> changeset.changes | |
iex> %{amount_due: 3000, due_date: ~D[2019-04-30], scheduled_send_date: ~D[2019-04-25]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment