View Source Mobilizon.Storage.Ecto (Mobilizon v4.1.0-alpha.1)
Mobilizon Ecto utils
Summary
Functions
@spec ensure_url(Ecto.Changeset.t(), atom()) :: Ecto.Changeset.t()
Ensure changeset contains an URL
If there's a blank URL that's because we're doing the first insert. Most of the time just go with the given URL.
@spec maybe_add_published_at(Ecto.Changeset.t()) :: Ecto.Changeset.t()
@spec sort(Ecto.Query.t(), atom(), atom()) :: Ecto.Query.t()
Adds sort to the query.