Skip to content

Commit 3a282a3

Browse files
authored
chore: Rename Ash.Gen.Resource.valid_relationship_type/1 (#2564)
Add trailing question mark
1 parent 85fc32b commit 3a282a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/mix/tasks/gen/ash.gen.resource.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ if Code.ensure_loaded?(Igniter) do
211211
Regex.match?(~r/^[a-zA-Z][a-zA-Z0-9_]*[!?]?$/, name)
212212
end
213213

214-
defp valid_relationship_type(type) do
214+
defp valid_relationship_type?(type) do
215215
type in ["has_one", "has_many", "many_to_many", "belongs_to"]
216216
end
217217

@@ -467,7 +467,7 @@ if Code.ensure_loaded?(Igniter) do
467467
)
468468

469469
[type, name, destination | modifiers] ->
470-
if !valid_relationship_type(type) do
470+
if !valid_relationship_type?(type) do
471471
raise "Invalid relationship type provided: #{type}"
472472
end
473473

0 commit comments

Comments
 (0)