Blog posts by:

Szymon Soppa

Rails & Elixir Developer
21.06.2018 | Szymon Soppa

Three ways of iterating over tree-like ActiveRecord structures

You are building an e-commerce app and at some point you introduce a Category model as a part of Product data. A Category can have various subcategories, which are represented by the same model. At this point, it's obvious we are dealing with a tree-like data structure. Step by step, I'll introduce three ways of iteration over such a structure and compare their performance.

Read more

Start a project with your dedicated software house

Top

Notice

We do not track you online. We use only session cookies and anonymous identifiers for the purposes specified in the cookie policy. No third-party trackers.

I understand
Elo Mordo!Elo Mordo!