mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 22:27:59 +01:00
order forums by name
This commit is contained in:
parent
b9d4400c0c
commit
fa8f969529
1 changed files with 1 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue