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 6658578 commit d80576bCopy full SHA for d80576b
lib/active_admin/mongoid/helpers/collection.rb
@@ -6,7 +6,11 @@ module Collection
6
original_collection_size = instance_method(:collection_size)
7
def collection_size(collection=collection)
8
if(not collection.empty? and collection.first.class.included_modules.include?(Mongoid::Document))
9
- collection.count(true)
+ if collection.first.class.embedded?
10
+ collection.count
11
+ else
12
+ collection.count(true)
13
+ end
14
else
15
original_collection_size(collection)
16
end
0 commit comments