Adds support for Rails 4. Fixes #1