diff --git a/lib/torch/pagination.ex b/lib/torch/pagination.ex index ad6be76..051d455 100644 --- a/lib/torch/pagination.ex +++ b/lib/torch/pagination.ex @@ -71,6 +71,8 @@ defmodule Torch.Pagination do @type filter_config() :: [Filtrex.Type.Config.t()] @type t() :: {:ok, page()} | {:error | any} + import Ecto.Query, only: [order_by: 2] + defmacro __using__(opts) do {:__aliases__, _, module_name} = Keyword.fetch!(opts, :model) {:__aliases__, _, repo_name} = Keyword.fetch!(opts, :repo)