Sorting with Ohm

ohm redis monk

05|10|2010

In the last 2 months of using Ohm, I have used sort a couple of times, and have ran into some gotchas.

Lesson 1: sort and sort_by are two different beasts

At first I thought that you can just do sort(:by => :field). The following example best illustrates what happens under the hood:

blog comments powered by Disqus