diff --git a/lib/philomena/adverts.ex b/lib/philomena/adverts.ex index 06a1104e..f1794d8d 100644 --- a/lib/philomena/adverts.ex +++ b/lib/philomena/adverts.ex @@ -162,7 +162,7 @@ defmodule Philomena.Adverts do iex> update_advert_image(advert, %{image: new_value}) {:ok, %Advert{}} - iex> update_advert(advert, %{image: bad_value}) + iex> update_advert_image(advert, %{image: bad_value}) {:error, %Ecto.Changeset{}} """ diff --git a/lib/philomena/autocomplete.ex b/lib/philomena/autocomplete.ex index f9cc9f44..e496ffc4 100644 --- a/lib/philomena/autocomplete.ex +++ b/lib/philomena/autocomplete.ex @@ -20,7 +20,7 @@ defmodule Philomena.Autocomplete do ## Examples - iex> get_artist_link() + iex> get_autocomplete() nil iex> get_autocomplete() diff --git a/lib/philomena/badges.ex b/lib/philomena/badges.ex index 494dd752..3cd0cd55 100644 --- a/lib/philomena/badges.ex +++ b/lib/philomena/badges.ex @@ -84,7 +84,7 @@ defmodule Philomena.Badges do end @doc """ - Updates a badge. + Updates a badge without updating its image. ## Examples @@ -101,6 +101,18 @@ defmodule Philomena.Badges do |> Repo.update() end + @doc """ + Updates the image for a badge. + + ## Examples + + iex> update_badge_image(badge, %{image: new_value}) + {:ok, %Badge{}} + + iex> update_badge_image(badge, %{image: bad_value}) + {:error, %Ecto.Changeset{}} + + """ def update_badge_image(%Badge{} = badge, attrs) do badge |> Badge.changeset(attrs)