Add rails 4.x compatibility

Nice catch, thanks! I'll update the code.