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
|
How to use this in an Ecto.Model
|
||||||
|
|
||||||
defmodule MyApp.Book do
|
defmodule MyApp.Thing do
|
||||||
use MyApp.Web, :model
|
use MyApp.Web, :model
|
||||||
|
|
||||||
schema "books" do
|
schema "things" do
|
||||||
field :#{ecto_type}, ISN.#{module}
|
field :#{ecto_type}, ISN.#{module}
|
||||||
# other fields
|
# other fields
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue