philomena/lib/philomena_web/views/comment_view.ex
2019-12-05 14:59:40 -05:00

19 lines
263 B
Elixir

defmodule PhilomenaWeb.CommentView do
use PhilomenaWeb, :view
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
end