mirror of
https://github.com/ash-project/ash_phoenix.git
synced 2024-09-08 09:30:49 +12:00
improvement: decimal protocols (#51)
This commit is contained in:
parent
4ba098143f
commit
02f4b54690
2 changed files with 8 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -27,3 +27,4 @@ ash_phoenix-*.tar
|
|||
/tmp
|
||||
|
||||
.vscode
|
||||
.DS_Store
|
||||
|
|
7
lib/ash_phoenix/types/decimal.ex
Normal file
7
lib/ash_phoenix/types/decimal.ex
Normal 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
|
Loading…
Reference in a new issue