From 39926ac4d0acc190917b612522d3190e88b7bc43 Mon Sep 17 00:00:00 2001 From: mathieuprog <5883963+mathieuprog@users.noreply.github.com> Date: Sun, 21 Jun 2020 19:01:01 +0200 Subject: [PATCH] Clean --- lib/html/form.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/html/form.ex b/lib/html/form.ex index 74f404f..54fda9c 100644 --- a/lib/html/form.ex +++ b/lib/html/form.ex @@ -119,7 +119,7 @@ if Code.ensure_loaded?(Phoenix.HTML) do _ -> [] end - embed_data = Map.get(changeset.data, embed_field) || get_embed_module(changeset, embed_field, embed_params) + embed_data = Map.get(changeset.data, embed_field) || get_embed_struct(changeset, embed_field, embed_params) embed_changeset = %Ecto.Changeset{ @@ -141,7 +141,7 @@ if Code.ensure_loaded?(Phoenix.HTML) do do_add_changes_for_nested_embeds(changeset, tail_params, errors) end - defp get_embed_module(changeset, field, params) do + defp get_embed_struct(changeset, field, params) do changeset |> Ecto.Changeset.cast(%{field => params}, []) |> Ecto.Changeset.cast_embed(field)