Rails4 support

Fixes #2