Rails 4 support

Attempt to fix #20