Fix deprecation warning on Rails 4.1