Skip to content

Instantly share code, notes, and snippets.

@boriscy
Created June 23, 2016 22:53
Show Gist options
  • Save boriscy/3f53bfaaec2145e1f47c46d28204215d to your computer and use it in GitHub Desktop.
Save boriscy/3f53bfaaec2145e1f47c46d28204215d to your computer and use it in GitHub Desktop.
alias Cart.{Repo, Item, Invoice, InvoiceItem}
Repo.insert(%Item{name: "Chocolates", price: Decimal.new("5")})
Repo.insert(%Item{name: "Gum", price: Decimal.new("2.5")})
Repo.insert(%Item{name: "Milk", price: Decimal.new("1.5")})
Repo.insert(%Item{name: "Rice", price: Decimal.new("2")})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment