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,7 +1,9 @@
defimpl Phoenix.HTML.Safe, for: Decimal do unless Phoenix.HTML.Safe.impl_for(Decimal) do
defdelegate to_iodata(data), to: Decimal, as: :to_string defimpl Phoenix.HTML.Safe, for: Decimal do
end defdelegate to_iodata(data), to: Decimal, as: :to_string
end
defimpl Phoenix.Param, for: Decimal do defimpl Phoenix.Param, for: Decimal do
defdelegate to_param(data), to: Decimal, as: :to_string defdelegate to_param(data), to: Decimal, as: :to_string
end
end end