Skip to content

Instantly share code, notes, and snippets.

@kenton
Created March 1, 2013 20:06
Show Gist options
  • Save kenton/5067351 to your computer and use it in GitHub Desktop.
Save kenton/5067351 to your computer and use it in GitHub Desktop.
158 @product_results = @searcher.retrieve_products.includes( :variants => {:option_values => :option_type})
159
160 @products_results.each do |p|
161 fs = p.flash_sales.select { |s| s.id == @flash_sale.id }.first
162 fsv = fs.flash_sale_variants.select { |v| v.product == e }.first
163 p.position = fsv.position
164 end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment