spree/spree — pull request #1438 by mbreit (2012-04-23 21:01:45+00:00)
Title: Fix selective brand filter

This pull request fixes a few issues with the selective brand filter in core/lib/spree/product_filters.rb.

1. It raises an exception if multiple brands are selected.
2. It shows the same brand multiple times (once for each product with that brand).
3. It does a slow SQL query for selecting all brands to build a condition hash which is not used. (Btw: the conditions are broken because they use the wrong table name, so they would not work anyhow.)

These issues are fixed in individual commits so they can be cherry-picked if you do not want to apply all of them.

Because this are bugs, I created a pull request against the 1-1-stable branch, but I can rebase it against master or another branch.