Fakultas Ilmu Komputer UI

Commit d8c635b9 authored by Muhammad Rafif Elfazri's avatar Muhammad Rafif Elfazri
Browse files

Temporary Ordering Search Filter On Threads

parent edad1d6e
......@@ -21,7 +21,8 @@ defmodule Diskuy.ForumThreadPage do
def page_search(title)do
|> where([p], ilike(p.title, ^"%#{String.replace(title, ~r/[%_(\\)]/, "\\\\\\0") }%"))
|> where([tr], ilike(tr.title, ^"%#{String.replace(title, ~r/[%_(\\)]/, "\\\\\\0") }%"))
|> order_by([tr], asc: tr.title , desc: tr.inserted_at )
def page_per_topic(topic_id) do
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment