14873: Removes activerecord-deprecated_finders gem dependency.
[arvados.git] / services / api / app / controllers / application_controller.rb
index 3cfe5b54fda2a2a90afa168938ab5ff9e4760064..7a9b7a67e5d7a8411763141fe7dd1a1a302e9116 100644 (file)
@@ -164,6 +164,10 @@ class ApplicationController < ActionController::Base
     send_error("Path not found", status: 404)
   end
 
+  def render_accepted
+    send_json ({accepted: true}), status: 202
+  end
+
   protected
 
   def send_error(*args)
@@ -519,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