Rails4 fix

Fixes #41