Remove deprecation warning on Rails 4