From 07310765ba45c64f08593fa05134c41d99396bbb Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Wed, 28 Aug 2019 18:30:55 -0400 Subject: [PATCH] fix naming --- lib/philomena/users.ex | 36 +++++++++---------- .../users/{fingerprints.ex => fingerprint.ex} | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) rename lib/philomena/users/{fingerprints.ex => fingerprint.ex} (89%) diff --git a/lib/philomena/users.ex b/lib/philomena/users.ex index 9f8ba2fa..a0410fb8 100644 --- a/lib/philomena/users.ex +++ b/lib/philomena/users.ex @@ -198,7 +198,7 @@ defmodule Philomena.Users do Ip.changeset(ip, %{}) end - alias Philomena.Users.Fingerprints + alias Philomena.Users.Fingerprint @doc """ Returns the list of user_fingerprints. @@ -206,28 +206,28 @@ defmodule Philomena.Users do ## Examples iex> list_user_fingerprints() - [%Fingerprints{}, ...] + [%Fingerprint{}, ...] """ def list_user_fingerprints do - Repo.all(Fingerprints) + Repo.all(Fingerprint) end @doc """ Gets a single fingerprints. - Raises `Ecto.NoResultsError` if the Fingerprints does not exist. + Raises `Ecto.NoResultsError` if the Fingerprint does not exist. ## Examples iex> get_fingerprints!(123) - %Fingerprints{} + %Fingerprint{} iex> get_fingerprints!(456) ** (Ecto.NoResultsError) """ - def get_fingerprints!(id), do: Repo.get!(Fingerprints, id) + def get_fingerprints!(id), do: Repo.get!(Fingerprint, id) @doc """ Creates a fingerprints. @@ -235,15 +235,15 @@ defmodule Philomena.Users do ## Examples iex> create_fingerprints(%{field: value}) - {:ok, %Fingerprints{}} + {:ok, %Fingerprint{}} iex> create_fingerprints(%{field: bad_value}) {:error, %Ecto.Changeset{}} """ def create_fingerprints(attrs \\ %{}) do - %Fingerprints{} - |> Fingerprints.changeset(attrs) + %Fingerprint{} + |> Fingerprint.changeset(attrs) |> Repo.insert() end @@ -253,31 +253,31 @@ defmodule Philomena.Users do ## Examples iex> update_fingerprints(fingerprints, %{field: new_value}) - {:ok, %Fingerprints{}} + {:ok, %Fingerprint{}} iex> update_fingerprints(fingerprints, %{field: bad_value}) {:error, %Ecto.Changeset{}} """ - def update_fingerprints(%Fingerprints{} = fingerprints, attrs) do + def update_fingerprints(%Fingerprint{} = fingerprints, attrs) do fingerprints - |> Fingerprints.changeset(attrs) + |> Fingerprint.changeset(attrs) |> Repo.update() end @doc """ - Deletes a Fingerprints. + Deletes a Fingerprint. ## Examples iex> delete_fingerprints(fingerprints) - {:ok, %Fingerprints{}} + {:ok, %Fingerprint{}} iex> delete_fingerprints(fingerprints) {:error, %Ecto.Changeset{}} """ - def delete_fingerprints(%Fingerprints{} = fingerprints) do + def delete_fingerprints(%Fingerprint{} = fingerprints) do Repo.delete(fingerprints) end @@ -287,10 +287,10 @@ defmodule Philomena.Users do ## Examples iex> change_fingerprints(fingerprints) - %Ecto.Changeset{source: %Fingerprints{}} + %Ecto.Changeset{source: %Fingerprint{}} """ - def change_fingerprints(%Fingerprints{} = fingerprints) do - Fingerprints.changeset(fingerprints, %{}) + def change_fingerprints(%Fingerprint{} = fingerprints) do + Fingerprint.changeset(fingerprints, %{}) end end diff --git a/lib/philomena/users/fingerprints.ex b/lib/philomena/users/fingerprint.ex similarity index 89% rename from lib/philomena/users/fingerprints.ex rename to lib/philomena/users/fingerprint.ex index 0cfddbb9..6c8053bc 100644 --- a/lib/philomena/users/fingerprints.ex +++ b/lib/philomena/users/fingerprint.ex @@ -1,4 +1,4 @@ -defmodule Philomena.Users.Fingerprints do +defmodule Philomena.Users.Fingerprint do use Ecto.Schema import Ecto.Changeset