improvement: decimal protocols (#51)

This commit is contained in:
ymijorski 2022-09-12 19:20:19 +03:00 committed by GitHub
parent 4ba098143f
commit 02f4b54690
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

1
.gitignore vendored
View file

@ -27,3 +27,4 @@ ash_phoenix-*.tar
/tmp
.vscode
.DS_Store

View file

@ -0,0 +1,7 @@
defimpl Phoenix.HTML.Safe, for: Decimal do
defdelegate to_iodata(data), to: Decimal, as: :to_string
end
defimpl Phoenix.Param, for: Decimal do
defdelegate to_param(data), to: Decimal, as: :to_string
end