Comment Ecto.Type module generating code

This commit is contained in:
Martin Frost 2015-10-02 20:45:53 +02:00
parent 0f89e38df3
commit 68967b1e63
1 changed files with 3 additions and 0 deletions

View File

@ -55,9 +55,12 @@ defmodule Isn do
do: binary
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
module_name = Module.concat([Isn, module])
ecto_type = module |> String.downcase |> String.to_atom
defmodule module_name do
@behaviour Ecto.Type