Remove deprecations when using ActiveRecord 4