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 the testing
might be a bit tedious to do.