mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 04:27:59 +01:00
12 lines
271 B
Elixir
12 lines
271 B
Elixir
|
defimpl Phoenix.Param, for: Float do
|
||
|
# Another Phoenix sadness:
|
||
|
#
|
||
|
# "By default, Phoenix implements this protocol for integers, binaries,
|
||
|
# atoms, and structs."
|
||
|
#
|
||
|
@spec to_param(float()) :: binary()
|
||
|
def to_param(term) do
|
||
|
Float.to_string(term)
|
||
|
end
|
||
|
end
|