Auto generate a slug

I have the following attributes and would like to autogenerate a slug from the name. Until now I always used https://github.com/wemake-services/ecto_autoslug_field to do this. What is the ash way to solve this?

attributes do uuid_primary_key :id attribute :name, :string attribute :slug, :string end
GitHub
Automatically create slugs for Ecto schemas. Contribute to wemake-services/ecto_autoslug_field development by creating an account on GitHub.
GitHub - wemake-services/ecto_autoslug_field: Automatically create ...
Was this page helpful?