Hacker News new | ask | show | jobs
by pmarreck 3781 days ago
I think this would be done better as a private function that takes a conn, a method, an action and an expected response code.

No need to complexify things unless you absolutely must.

1 comments

Agreed. Elixir's first rule of macros is to not use macros. Generally idiomatic elixir is to try to encapsulate your problem in (ordered by priority) a 1) data structure 2) function 3) macro. So if you can express your problem in something other than a macro, do so.