Added rails 4 support