EctoAutoslugField.SlugGenerator (ecto_autoslug_field v3.0.0) View Source

This module works with slugs itself. It is just a wrapper around 'Slugger'.

It is suited for inner use.

Link to this section Summary

Functions

This is a public wrapper around do_build_slug/1 functions.

This function conditionally generates slug.

Link to this section Functions

Link to this function

build_slug(sources, changeset)

View Source

Specs

build_slug(Keyword.t(), Ecto.Changeset.t()) :: String.t()

This is a public wrapper around do_build_slug/1 functions.

Default slug builder.

Link to this function

maybe_generate_slug(changeset, source, opts)

View Source

Specs

maybe_generate_slug(Ecto.Changeset.t(), atom() | list(), Keyword.t()) ::
  Ecto.Changeset.t()

This function conditionally generates slug.

This function prepares sources and then calls do_generate_slug/3.