14873: Removes activerecord-deprecated_finders gem dependency.
authorLucas Di Pentima <ldipentima@veritasgenetics.com>
Mon, 18 Mar 2019 20:10:04 +0000 (17:10 -0300)
committerLucas Di Pentima <ldipentima@veritasgenetics.com>
Wed, 20 Mar 2019 17:54:36 +0000 (14:54 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

services/api/Gemfile
services/api/Gemfile.lock
services/api/app/controllers/application_controller.rb

index ad27c2df1290d624e1bbe4cdfa70a0bbc100bb1e..c91495d8f5b9c4a8bd5b00ebbb8553e4cd01be60 100644 (file)
@@ -23,10 +23,6 @@ end
 # We need this dependency because of crunchv1
 gem 'arvados-cli'
 
-# We'll need to update related code prior to Rails 5.
-# See: https://github.com/rails/activerecord-deprecated_finders
-gem 'activerecord-deprecated_finders', require: 'active_record/deprecated_finders'
-
 # pg is the only supported database driver.
 # Note: Rails 4.2 is not compatible with pg 1.0
 #       (See: https://github.com/rails/rails/pull/31671)
index 9f7f36ee01370ae13e6c22cc06e9ce7ac05d3035..ad76a2ffb1b869ead7451ed95e13062f38f5b114 100644 (file)
@@ -37,7 +37,6 @@ GEM
       activemodel (= 4.2.11)
       activesupport (= 4.2.11)
       arel (~> 6.0)
-    activerecord-deprecated_finders (1.0.4)
     activesupport (4.2.11)
       i18n (~> 0.7)
       minitest (~> 5.1)
@@ -281,7 +280,6 @@ PLATFORMS
   ruby
 
 DEPENDENCIES
-  activerecord-deprecated_finders
   acts_as_api
   andand
   arvados (>= 1.3.1.20190301212059)
index 6dbba1a24b088ad036bdd78af93816cdcaca9970..7a9b7a67e5d7a8411763141fe7dd1a1a302e9116 100644 (file)
@@ -523,7 +523,7 @@ class ApplicationController < ActionController::Base
       if @objects.respond_to? :except
         list[:items_available] = @objects.
           except(:limit).except(:offset).
-          count(:id, distinct: true)
+          distinct.count(:id)
       end
     when 'none'
     else