Rails 4

Hi Chaps,

I had a crack at moving over to Rails 4 (what a ludicrous thing to start doing at bed time) after seeing #247

I went rogue and didn't use the established rails-4 branch to avoid being out of date from the master branch.

Let me know if I've missed anything.

Cheers,
Pete