docs: fix typo in code snippet for change actions doc (#1032)

This commit is contained in:
Ben Swift 2024-04-16 20:58:53 +10:00 committed by GitHub
parent 8bcbfc5b17
commit 3c06d04124
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -38,7 +38,7 @@ defmodule MyApp.Changes.Slugify do
@impl true
def change(changeset, opts, _context) do
case Ash.Changeset.fetch_change(changeset, opts[:attribute)) do
case Ash.Changeset.fetch_change(changeset, opts[:attribute]) do
{:ok, new_value} ->
slug = String.replace(new_value, ~r/\s+/, "-")
Ash.Changeset.force_change_attribute(changeset, opts[:attribute], slug)