Merge pull request #140 from tomhughes/rails4

Rails 4 support