Created
April 18, 2013 00:36
-
-
Save jsqu99/5408936 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with(:price, Range.new(price.split('-').first, price.split('-').last)) if price | |
# see https://github.com/sunspot/sunspot#readme for a good explanation of using 'row' with facets | |
facet(:price) do | |
PRODUCT_PRICE_RANGES.each do |range| | |
row(range) do | |
Rails.logger.debug("adding price facet w/ range: #{range.split('-').first}, #{range.split('-').last}") | |
with(:price, Range.new(range.split('-').first, range.split('-').last)) | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment