forum titles, better tag disjunction

This commit is contained in:
byte[] 2019-12-20 10:33:39 -05:00
parent e922f9a94b
commit 8d5aad56f6
2 changed files with 5 additions and 2 deletions

View file

@ -35,6 +35,6 @@ defmodule PhilomenaWeb.ForumController do
watching = Forums.subscribed?(forum, user)
render(conn, "show.html", title: "Showing Forum", forum: conn.assigns.forum, watching: watching, topics: topics)
render(conn, "show.html", title: forum.name, forum: conn.assigns.forum, watching: watching, topics: topics)
end
end

View file

@ -50,7 +50,10 @@ defmodule PhilomenaWeb.ProfileView do
end
def tag_disjunction(tags) do
Enum.map_join(tags, " || ", & &1.name)
tags
|> Enum.map(& &1.name)
|> Enum.uniq()
|> Enum.join(" || ")
end
def can_ban?(conn),