Make Rails 4 comnpatible