Skip to content

Commit

Permalink
Only return unique products from taxon_preview method
Browse files Browse the repository at this point in the history
  • Loading branch information
radar committed Jul 24, 2012
1 parent 980348a commit f640346
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/app/helpers/spree/taxons_helper.rb
Expand Up @@ -9,6 +9,7 @@ def taxon_preview(taxon, max=4)
taxon.descendants.each do |taxon|
to_get = max - products.length
products += taxon.active_products.limit(to_get)
products = products.uniq
break if products.size >= max
end
end
Expand Down

0 comments on commit f640346

Please sign in to comment.