Ecto.Changeset.fetch_field-exclamation-mark

You're seeing just the function fetch_field-exclamation-mark, go back to Ecto.Changeset module for more information.
Link to this function

fetch_field!(changeset, key)

View Source

Specs

fetch_field!(t(), atom()) :: term()

Same as fetch_field/2 but returns the value or raises if the given key was not found.

Examples

iex> post = %Post{title: "Foo", body: "Bar baz bong"}
iex> changeset = change(post, %{title: "New title"})
iex> fetch_field!(changeset, :title)
"New title"
iex> fetch_field!(changeset, :other)
** (KeyError) key :other not found in: %Post{...}