COMPLEX WEB APPS MADE SIMPLE

written by PrimeHammer

Ivan

Ivan

Apart from Rails, I like getting my hands dirty debugging DNS while watching Adventure Time animated series.

Playing with “joins” in ActiveRecord

4 min read

On many occasions we need to load multiple records with associations from a database. The easiest way is to access this is via iteration (.each) written in Ruby. This is not the best approach as it can result in issuing 1+n queries (complexity O(n)) instead of single query (O(1)). Using iteration isn’t optimal because as the […]