We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95ec363 commit 58af92cCopy full SHA for 58af92c
lib/active_admin/mongoid/helpers/collection.rb
@@ -5,7 +5,8 @@ module Collection
5
alias original_collection_size collection_size
6
original_collection_size = instance_method(:collection_size)
7
8
- def collection_size(collection=collection)
+ def collection_size(collection = nil)
9
+ collection ||= self.collection
10
if collection.is_a?(::Mongoid::Criteria)
11
collection.count(true)
12
else
0 commit comments