lib/picky/index_facets.rb in picky-4.6.0 vs lib/picky/index_facets.rb in picky-4.6.1
- old
+ new
@@ -13,11 +13,10 @@
#
def facets category_identifier, options = {}
text_ids = self[category_identifier].exact.inverted
no_counts = options[:counts] == false
minimal_counts = options[:at_least]
- text_ids.inject(no_counts ? [] : {}) do |result, text_ids|
- text, ids = text_ids
+ text_ids.inject(no_counts ? [] : {}) do |result, (text, ids)|
size = ids.size
next result if minimal_counts && size < minimal_counts
if no_counts
result << text
else