From 7e70147981b5c4656419e66802ef1c25c67b5393 Mon Sep 17 00:00:00 2001 From: Martin Frost Date: Fri, 24 Nov 2023 23:11:51 +0100 Subject: [PATCH] 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. --- lib/isn.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/isn.ex b/lib/isn.ex index a99f605..86013ed 100644 --- a/lib/isn.ex +++ b/lib/isn.ex @@ -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