mongodb, mongoid, will_paginate and sorting

Posted: April 6th, 2010 | Author: jgeiger | Filed under: mongodb, ruby, web | Tags: , , | 1 Comment »

Had a bit of an issue with will_paginate and mongoid. I couldn’t find an example of how to sort the pagination query and paginating without a defined sort order defeats the purpose.

paginate(:page => page, :per_page => size, :sort => [['ontology_term_id', :desc], ['_id', :asc]])

Instead of using “order” or “order_by” you can just use “sort” with an array of arrays.


shared host or small vps

Posted: February 24th, 2010 | Author: jgeiger | Filed under: ruby, web | Tags: , , , | No Comments »

I started looking into moving off of dreamhost because I’ve had some issues with responsiveness on my applications. For $20 a year, I could put up with it. Now that I’m paying $100, it’s a bit more annoying since there are other options out there at that price point.

I’m considering slicehost.com, linode.com and webfaction.com.

I guess the other big reason is that I want to play with MongoDB and each of these gives me that option.