mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
Fix documentation errors
This commit is contained in:
parent
bd4dfd9016
commit
dbbc067679
3 changed files with 15 additions and 3 deletions
|
@ -162,7 +162,7 @@ defmodule Philomena.Adverts do
|
||||||
iex> update_advert_image(advert, %{image: new_value})
|
iex> update_advert_image(advert, %{image: new_value})
|
||||||
{:ok, %Advert{}}
|
{:ok, %Advert{}}
|
||||||
|
|
||||||
iex> update_advert(advert, %{image: bad_value})
|
iex> update_advert_image(advert, %{image: bad_value})
|
||||||
{:error, %Ecto.Changeset{}}
|
{:error, %Ecto.Changeset{}}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -20,7 +20,7 @@ defmodule Philomena.Autocomplete do
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
iex> get_artist_link()
|
iex> get_autocomplete()
|
||||||
nil
|
nil
|
||||||
|
|
||||||
iex> get_autocomplete()
|
iex> get_autocomplete()
|
||||||
|
|
|
@ -84,7 +84,7 @@ defmodule Philomena.Badges do
|
||||||
end
|
end
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Updates a badge.
|
Updates a badge without updating its image.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
@ -101,6 +101,18 @@ defmodule Philomena.Badges do
|
||||||
|> Repo.update()
|
|> Repo.update()
|
||||||
end
|
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
|
def update_badge_image(%Badge{} = badge, attrs) do
|
||||||
badge
|
badge
|
||||||
|> Badge.changeset(attrs)
|
|> Badge.changeset(attrs)
|
||||||
|
|
Loading…
Reference in a new issue