mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-20 06:37: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
|
user = conn.assigns.current_user
|
||||||
forums =
|
forums =
|
||||||
Forum
|
Forum
|
||||||
|
|> order_by(asc: :name)
|
||||||
|> preload([last_post: [:topic, :user]])
|
|> preload([last_post: [:topic, :user]])
|
||||||
|> Repo.all()
|
|> Repo.all()
|
||||||
|> Enum.filter(&Canada.Can.can?(user, :show, &1))
|
|> Enum.filter(&Canada.Can.can?(user, :show, &1))
|
||||||
|
|
Loading…
Reference in a new issue