Skip to content

Commit

Permalink
Fix docs on order_by+dynamic, closes #3257
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Apr 4, 2020
1 parent b4b6947 commit 1e0b077
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guides/howtos/Dynamic queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,13 @@ end

# 2. Returned dynamic with join binding
def filter_order_by("published_at_desc"),
do: dynamic([p], desc: p.published_at)
do: [desc: dynamic([p], p.published_at)]

def filter_order_by("published_at"),
do: dynamic([p], p.published_at)

def filter_order_by("author_name_desc"),
do: dynamic([authors: a], desc: a.name)
do: [desc: dynamic([authors: a], a.name)]

def filter_order_by("author_name"),
do: dynamic([authors: a], a.name)
Expand Down

0 comments on commit 1e0b077

Please sign in to comment.