When working with Mongoid (MongoDB ORM for Rails), you might write something like:
likes = Like.where(user: user)
At first glance, you might think this line runs a database query immediately. But, surprise, it doesn’t. In this post, we’ll unpack what...