--
You received this message because you are subscribed to the Google Groups "elixir-ecto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-ecto...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-ecto/c6e98df6-874e-4c30-b922-fd302856eaa3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-ecto/45134D3D-3B9D-44D8-AEB8-6131C4FFEE22%40muskala.eu.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-ecto/6231BBFD-504B-4520-90AD-9163B564B379%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-ecto/CAGnRm4JSsZ6KvvveiWwNz4zH%2BAUHHTjVV8ks7ggpzc0H-NRzRw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-ecto/3ff48a4c-aa35-4dfe-aa40-215321fb5820%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-ecto/A34976C2-F794-431A-94E4-B94E46E71D6F%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-ecto/CAOtk34daGyvmOEx%2BBR4kdX73nFnE_DXfuCxYbEWc%2BaNsSRNiJg%40mail.gmail.com.
On Jul 19, 2016, at 6:07 AM, Theron Boerner <hunter...@gmail.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-ecto/CAOtk34daGyvmOEx%2BBR4kdX73nFnE_DXfuCxYbEWc%2BaNsSRNiJg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-ecto/F4679BDC-21D5-406A-8F76-61F40141424A%40gmail.com.
If get_users() returns anything but {:ok, <something>}, with will abort and then call the else clause. If you needed to do this with case you'd have to have multiple cases, and then your error handling clause would have to be duplicated:case all_users(conn) do{:ok, query} ->case get_users(query) do{:ok, users} -> render(conn, "index.json", data:users){:error, _} -> render(conn, ErrorView, "404.json")end{:error, _} ->render(conn, ErrorView, "404.json")end
--
You received this message because you are subscribed to the Google Groups "elixir-ecto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-ecto...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-ecto/6b64ef94-18cf-45b8-8dbd-7e29c5b2b7d5%40googlegroups.com.