Mongoid Sorting
I was recently trying to get Mongoid sort_by working with time stamp but it would not sort. Switched to Model.asc(:fieldname) and that works fine.
Written by Bob Roberts
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#N
Authors
Related Tags
#n
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#