module ActiveAdmin::Helpers::Collection
def collection_is_empty?(c = collection)
def collection_is_empty?(c = collection) collection_size(c) == 0 end
def collection_size(c = collection)
1. removes `select` and `order` to prevent invalid SQL
def collection_size(c = collection) c = c.except :select, :order c.group_values.present? ? c.count.count : c.count end