The state of Rails plugins

Plugins are great, they help you dry up your code, add features, etc. quickly and easily. But how do you know if a plugin is going to be good, or if it’s outdated completely…..
I usually check the following sites to find out: and
The latter is mostly an overview of gems categorized by what they […]

Using will_paginate in sinatra

Want some sweet pagination on your sinatra app? I know it’s a loaded question with sinatra’s methodology of keeping things slim, but here goes.
There is a framework agnostic branch of mislav-will_paginate on github. What I did was pull that into vendor/gems and added the following code to make it work.
$LOAD_PATH.unshift File.dirname(__FILE__) + ‘/vendor/gems/will_paginate/lib’ # using […]

batch finding composite primary keys [SOLVED]

Issue with composite_primary_keys and find_in_batches. In short, they don’t play nicely together.


Rails 2.3+ find_in_batches will not work if your model has composite primary keys.


I found this gist:

which solved the issue. I just dropped it into a file in RAILS_ROOT/config/initializers to extend active record to be able to do batch finds on those models which use composite_primary_keys