From 0d5f8406cd43864157de5041af873da8f8955514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=81=C4=99picki?= Date: Mon, 22 Nov 2021 13:52:37 +0100 Subject: [PATCH] Update Form.datetime_select/3 example to use H sigil (#364) Closes #363 --- lib/phoenix_html/form.ex | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/phoenix_html/form.ex b/lib/phoenix_html/form.ex index d49facd..e0d85ba 100644 --- a/lib/phoenix_html/form.ex +++ b/lib/phoenix_html/form.ex @@ -1462,9 +1462,11 @@ defmodule Phoenix.HTML.Form do def my_datetime_select(form, field, opts \\ []) do builder = fn b -> - ~e""" - Date: <%= b.(:day, []) %> / <%= b.(:month, []) %> / <%= b.(:year, []) %> - Time: <%= b.(:hour, []) %> : <%= b.(:minute, []) %> + assigns = %{b: b} + + ~H""" + Date: <%= @b.(:day, []) %> / <%= @b.(:month, []) %> / <%= @b.(:year, []) %> + Time: <%= @b.(:hour, []) %> : <%= @b.(:minute, []) %> """ end