Elixir for Ruby developers: the three most important differences Creating infinite sequences with Stream.unfold/2

Autocontext: Lets DRY your Ecto contexts.

Yeah, for some, this could be an Ecto’s heresy, but I’ve built a lib that provides ActiveRecord-like callbacks, simplifying database operations management. This includes [before | after]_save, [before | after]_create, [before | after]_update, and [before | after]_delete functions. Also, thanks to the Elixir community I have also added some configurability that is (yet) inaudit on ActiveRecord land. This is:

  1. Support for optional transactions on the operation. Behind the scenes the operation is wrapped in a Ecto.Multi
  2. Support for multiple configurations that may involve different Changesets over a Single Schema or even different Changesets over different Schemas.

    Example:

image

This is Just a way to abstract the functions you would write anyway on your contexts, Behind the scenes it uses the typical Ecto calls, it just saves writing and repeating the same code every time. Imo having to write the same every time does not make sense. Of course for the 1% of the times when it does you can overwrite the functions at your will.

Make your Ecto contexts fun! https://github.com/michelson/autocontext