Experimental internet forum
Easily and efficiently make your ActiveRecord models support hierarchies
I'm actually using materialized views and CTE with PhotoStructure (where hierarchies are arguably the cornerstone of the product).
It's pretty funny that I landed on this implementation, given that I spent a couple years building https://github.com/ClosureTree/closure_tree (one of the most popular acts-as-hierarchy ActiveRecord gems), as it (unsurprisingly) uses closure trees.
When CTE isn't available, closure trees are nice, but boy howdy, does that closure tree table get gigantic with deeper graphs.
If CTE is available, closure trees don't even come close in performance and simplicity.
(Hint: materialized paths should use a unique separator: ASCII 0x1F is applicable: https://en.wikipedia.org/wiki/C0_and_C1_control_codes#Field_...)
Truly a developer’s best friend. Scout APM is great for developers who want to find and fix performance issues in their applications. With Scout, we'll take care of the bugs so you can focus on building great things 🚀.
Find all objects of a chain of associations on the same table
2 projects | reddit.com/r/rails | 2 Mar 2021
Accessing point in time data when data changes over time
3 projects | reddit.com/r/rails | 12 Aug 2022
store_model 1.0.0. released
2 projects | reddit.com/r/rails | 28 Jun 2022
SQL help me please with multi nested childs
1 project | reddit.com/r/rails | 1 Jun 2022
Looking for a Rails Gem that Audits Manual Database Changes
2 projects | reddit.com/r/rails | 23 May 2022