ecto_fields v1.3.0 EctoFields.Slug
Link to this section Summary
Functions
Coerce a regular string into a slug
Callback implementation for Ecto.Type.dump/1
.
Callback implementation for Ecto.Type.equal?/2
.
Callback implementation for Ecto.Type.load/1
.
Callback implementation for Ecto.Type.type/0
.
Link to this section Functions
Link to this function
cast(title)
Coerce a regular string into a slug
Examples
iex> EctoFields.Slug.cast(" My latest blog post-")
{:ok, "my-latest-blog-post"}
iex> EctoFields.Slug.cast("From the ЉЊАБЖЗ Naughty ЁЂЃЄ Strings цчшщъыьэюя list")
{:ok, "from-the-naughty-strings-list"}
Link to this function
dump(slug)
Callback implementation for Ecto.Type.dump/1
.
Link to this function
embed_as(_)
Link to this function
equal?(a, b)
Callback implementation for Ecto.Type.equal?/2
.
Link to this function
load(slug)
Callback implementation for Ecto.Type.load/1
.
Link to this function
type()
Callback implementation for Ecto.Type.type/0
.