From 8d5aad56f6da6d9fd7a1086ca0afef0b1764a44d Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Fri, 20 Dec 2019 10:33:39 -0500 Subject: [PATCH] forum titles, better tag disjunction --- lib/philomena_web/controllers/forum_controller.ex | 2 +- lib/philomena_web/views/profile_view.ex | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/philomena_web/controllers/forum_controller.ex b/lib/philomena_web/controllers/forum_controller.ex index aa44c8a8..89ace9dc 100644 --- a/lib/philomena_web/controllers/forum_controller.ex +++ b/lib/philomena_web/controllers/forum_controller.ex @@ -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 diff --git a/lib/philomena_web/views/profile_view.ex b/lib/philomena_web/views/profile_view.ex index 93fa0520..68c43150 100644 --- a/lib/philomena_web/views/profile_view.ex +++ b/lib/philomena_web/views/profile_view.ex @@ -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),