Skip to content

Commit 58af92c

Browse files
committed
Cleanup for rb 2.2
1 parent 95ec363 commit 58af92c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/active_admin/mongoid/helpers/collection.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ module Collection
55
alias original_collection_size collection_size
66
original_collection_size = instance_method(:collection_size)
77

8-
def collection_size(collection=collection)
8+
def collection_size(collection = nil)
9+
collection ||= self.collection
910
if collection.is_a?(::Mongoid::Criteria)
1011
collection.count(true)
1112
else

0 commit comments

Comments
 (0)