Rails 4 upgrade

Covers #9.