Make it work for Rails 4.0