order_by fixNum, integer… mongoid
I have an object with attribute impressionist_count. impressionist_count is a Fixnum.
object.impressionist_count # => `20`, `1000`, `26`, etc.
I want to sort all my objects in descending order, but it does not work, something like:
I don't know what I am doing wrong. How can I fix this code?
Or you can use .order_by() if you wrap using arrays like this: