Skip to content

Commit b874af9

Browse files
address comments
1 parent efae47b commit b874af9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/pointing_party/card.ex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ defmodule PointingParty.Card do
55
alias PointingParty.Repo
66
alias PointingParty.Card
77

8-
def points_range, do: [0, 1, 3, 5]
98

109
schema "cards" do
1110
field :description, :string
@@ -15,12 +14,14 @@ defmodule PointingParty.Card do
1514
timestamps()
1615
end
1716

17+
def points_range, do: [0, 1, 3, 5]
18+
1819
@doc false
1920
def changeset(card, attrs) do
2021
card
2122
|> cast(attrs, [:title, :description, :points])
2223
|> validate_required([:title, :description])
23-
|> validate_inclusion(:points, Card.points_range)
24+
|> validate_inclusion(:points, Card.points_range())
2425
end
2526

2627
def get!(id) do

0 commit comments

Comments
 (0)