Skip to content

Commit

Permalink
Fix warning on latest Elixir
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Oct 18, 2022
1 parent 18cccb7 commit 6e23d1a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/phoenix/router/resource.ex
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ defmodule Phoenix.Router.Resource do
defp validate_actions(type, singleton, actions) do
supported_actions = default_actions(singleton)

unless actions -- supported_actions == [], do: raise ArgumentError, """
invalid :#{type} action(s) passed to resources.
unless actions -- supported_actions == [] do
raise ArgumentError, """
invalid :#{type} action(s) passed to resources.
supported#{if singleton, do: " singleton", else: ""} actions: #{inspect(supported_actions)}
supported#{if singleton, do: " singleton", else: ""} actions: #{inspect(supported_actions)}
got: #{inspect(actions)}
"""
got: #{inspect(actions)}
"""
end

supported_actions
end
Expand Down

0 comments on commit 6e23d1a

Please sign in to comment.