Rails 4 compatibilty