Posts that contain elixir

Adding XML support in Phoenix 1.7

It wasn't so obvious how to render XML in Phoenix with the new approach to live views and rendering of templates. This is quick guide on how to do so. This could be wrong at the moment of reading this but always refer to the internet.

Tags: elixir , functional

Mocks and Elixir

Walk through example of testing in elixir using Mox. This examples walks through testing a module that makes API calls to a 3rd party client. It's a long tutorial.

Tags: elixir , mox , mocks , testing

Enum with an index

Iterating over a list and knowing the index or position of that item can be useful. Especially in situations where you know you need to perform some action or update some event.

Tags: elixir , lists , enum