Make it compatible with Rails >= 3

Nice work! This gem is really useful.