Skip to content

Instantly share code, notes, and snippets.

@alanpeabody
Created March 11, 2015 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanpeabody/df93f6296ec1e3ec6b61 to your computer and use it in GitHub Desktop.
Save alanpeabody/df93f6296ec1e3ec6b61 to your computer and use it in GitHub Desktop.
embedding elixir structs step 4
defmodule App.Models.User do
use Ecto.Model
schema "users" do
field :email, :string
field :crypted_pass, :string
field :settings, App.Models.Settings.Type
field :addresses, App.Models.Address.Type
timestamps
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment