From 2fe38e617f98363caca43e3b77820648747400ea Mon Sep 17 00:00:00 2001 From: adhiguna sabril Date: Sat, 6 Dec 2014 14:52:24 +0800 Subject: [PATCH] change count() to count(:all) --- lib/rails_admin/adapters/active_record.rb | 2 +- lib/rails_admin/adapters/mongoid.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rails_admin/adapters/active_record.rb b/lib/rails_admin/adapters/active_record.rb index 9d627096ca..2afd00876e 100644 --- a/lib/rails_admin/adapters/active_record.rb +++ b/lib/rails_admin/adapters/active_record.rb @@ -40,7 +40,7 @@ def all(options = {}, scope = nil) end def count(options = {}, scope = nil) - all(options.merge(limit: false, page: false), scope).count + all(options.merge(limit: false, page: false), scope).count(:all) end def destroy(objects) diff --git a/lib/rails_admin/adapters/mongoid.rb b/lib/rails_admin/adapters/mongoid.rb index d40e3b6b29..72fc3d2f4b 100644 --- a/lib/rails_admin/adapters/mongoid.rb +++ b/lib/rails_admin/adapters/mongoid.rb @@ -48,7 +48,7 @@ def all(options = {}, scope = nil) end def count(options = {}, scope = nil) - all(options.merge(limit: false, page: false), scope).count + all(options.merge(limit: false, page: false), scope).count(:all) end def destroy(objects)