Ecto.Changeset.update_change
You're seeing just the function
update_change
, go back to Ecto.Changeset module for more information.
Specs
Updates a change.
The given function
is invoked with the change value only if there
is a change for the given key
. Note that the value of the change
can still be nil
(unless the field was marked as required on validate_required/3
).
Examples
iex> changeset = change(%Post{}, %{impressions: 1})
iex> changeset = update_change(changeset, :impressions, &(&1 + 1))
iex> changeset.changes.impressions
2