Generalize docs a bit
Not all of our types are reasonable to have on a `Book` module/schema, so let's call them `Thing` instead.
This commit is contained in:
parent
0bda009e38
commit
7e70147981
|
|
@ -80,10 +80,10 @@ for module <- ~w(ISBN ISMN ISSN ISBN13 ISMN13 ISSN13 UPC EAN13) do
|
|||
|
||||
How to use this in an Ecto.Model
|
||||
|
||||
defmodule MyApp.Book do
|
||||
defmodule MyApp.Thing do
|
||||
use MyApp.Web, :model
|
||||
|
||||
schema "books" do
|
||||
schema "things" do
|
||||
field :#{ecto_type}, ISN.#{module}
|
||||
# other fields
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue