Make it compatible with Rails 4.1.5