Updates to support Rails4

This will *only* support Rails4 as I'm not sure if you prefer to keep
a separate semantic version for Rails3 instead of trying to support both
in a single gem.

It should be fairly straightforward to support both, though testing
for each major version of rails could be quite tedious.