defp get_action(conn) do
conn.assigns
|> Map.fetch(:action)
|> case do
{:ok, action} -> action
_ -> conn.private.phoenix_action
end
end
wrongfully assumes that an unrelated resource conn.assigns.action is me specifying the action manually :wink:
Maybe use a namespace (i.e. canary_action) or a different name (i.e. controller_action, router_action) or something? conn.assigns.action is rather generic!
The check in
get_action
:wrongfully assumes that an unrelated resource
conn.assigns.action
is me specifying theaction
manually :wink:Maybe use a namespace (i.e.
canary_action
) or a different name (i.e.controller_action
,router_action
) or something?conn.assigns.action
is rather generic!