rails 4 fix

Fixes issue #34 for rails 4 support