Rails 4 and Ruby 2

I found that this plugin wasn't working on Rails 4, so here's a patch. /cc @eudoxa