philomena/lib/philomena_web/views/comment_view.ex

20 lines
263 B
Elixir
Raw Normal View History

2019-10-05 02:51:56 +02:00
defmodule PhilomenaWeb.CommentView do
use PhilomenaWeb, :view
2019-12-05 20:59:40 +01:00
def link_to_ip(ip) do
if ip do
ip
else
"N/A"
end
end
def link_to_fingerprint(fp) do
if fp do
fp |> String.slice(0..6)
else
"N/A"
end
end
2019-10-05 02:51:56 +02:00
end