Make it work with Rails 4.1