fix: only impl Phoenix.HTML.Safe if it hasn't already been

This commit is contained in:
Zach Daniel 2022-09-15 18:46:21 -04:00
parent b64cd13941
commit 75f07d1235

View file

@ -1,3 +1,4 @@
unless Phoenix.HTML.Safe.impl_for(Decimal) do
defimpl Phoenix.HTML.Safe, for: Decimal do
defdelegate to_iodata(data), to: Decimal, as: :to_string
end
@ -5,3 +6,4 @@ end
defimpl Phoenix.Param, for: Decimal do
defdelegate to_param(data), to: Decimal, as: :to_string
end
end