legendary-doc-site/apps/content/lib/terms.ex

16 lines
332 B
Elixir
Raw Normal View History

2020-07-20 22:04:04 +00:00
defmodule Content.Terms do
@moduledoc """
This module contains functions for retrieving, manipulating, and saving
Terms.
"""
import Ecto.Query
def categories do
from t in Content.Term,
join: tt in Content.TermTaxonomy,
on: t.term_id == tt.term_id,
where: tt.taxonomy == "category"
end
end