Comment Ecto.Type module generating code
This commit is contained in:
parent
0f89e38df3
commit
68967b1e63
|
|
@ -55,9 +55,12 @@ defmodule Isn do
|
||||||
do: binary
|
do: binary
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Generate Ecto.Type modules for all supported data types in the `isn`
|
||||||
|
# postgresql module.
|
||||||
for module <- ~w(ISBN ISMN ISSN ISBN13 ISMN13 ISSN13 UPC EAN13) do
|
for module <- ~w(ISBN ISMN ISSN ISBN13 ISMN13 ISSN13 UPC EAN13) do
|
||||||
module_name = Module.concat([Isn, module])
|
module_name = Module.concat([Isn, module])
|
||||||
ecto_type = module |> String.downcase |> String.to_atom
|
ecto_type = module |> String.downcase |> String.to_atom
|
||||||
|
|
||||||
defmodule module_name do
|
defmodule module_name do
|
||||||
@behaviour Ecto.Type
|
@behaviour Ecto.Type
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue