From fa8f96952945aa2515c0e8ef61725505e2912cfb Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Sun, 17 Nov 2019 17:55:20 -0500 Subject: [PATCH] order forums by name --- lib/philomena_web/controllers/forum_controller.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/philomena_web/controllers/forum_controller.ex b/lib/philomena_web/controllers/forum_controller.ex index b18abdd0..8a276355 100644 --- a/lib/philomena_web/controllers/forum_controller.ex +++ b/lib/philomena_web/controllers/forum_controller.ex @@ -11,6 +11,7 @@ defmodule PhilomenaWeb.ForumController do user = conn.assigns.current_user forums = Forum + |> order_by(asc: :name) |> preload([last_post: [:topic, :user]]) |> Repo.all() |> Enum.filter(&Canada.Can.can?(user, :show, &1))