ecto_fields v0.0.2 EctoFields.Slug

Summary

Functions

Coerce a regular string into a slug

Callback implementation for c:Ecto.Type.dump/1

Callback implementation for c:Ecto.Type.load/1

Callback implementation for c:Ecto.Type.type/0

Functions

cast(title)

Coerce a regular string into a slug

## Examples

iex> EctoFields.Slug.cast(“ My latest blog post-“) “my-latest-blog-post”

iex> EctoFields.Slug.cast(“From the ЉЊАБЖЗ Naughty ЁЂЃЄ Strings цчшщъыьэюя list”) “from-the-naughty-strings-list”

dump(slug)

Callback implementation for c:Ecto.Type.dump/1.

load(slug)

Callback implementation for c:Ecto.Type.load/1.

type()

Callback implementation for c:Ecto.Type.type/0.