Skip to content

Commit

Permalink
up README with sample
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieupinte committed Jul 27, 2017
1 parent 510bf55 commit 65583ec
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,25 @@ def deps do
end
```

## Use

```elixir
defmodule MyApp.User do
use MyApp.Web, :model

@primary_key {:id, :binary_id, autogenerate: true}
@derive {Phoenix.Param, key: :id}

schema "users" do
field :email, :string
field :provider, Ecto.Atom # :github => 'github' in DB
field :uid, :string
field :token, :string
...
end
end
```

Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/ecto_atom](https://hexdocs.pm/ecto_atom).
Expand Down

0 comments on commit 65583ec

Please sign in to comment.