Skip to content

Instantly share code, notes, and snippets.

@0xjmp
Created February 19, 2014 21:36
Show Gist options
  • Select an option

  • Save 0xjmp/9102155 to your computer and use it in GitHub Desktop.

Select an option

Save 0xjmp/9102155 to your computer and use it in GitHub Desktop.
child(:swatch => :active_swatch) do
node(:name){|swatch| swatch.name.titleize}
node(:image_url){|swatch| image_url("products/#{swatch.permalink}.jpg") }
node(:product_url){|swatch| product_url(product.permalink)} << HERE
end
child(:collection_products => :collection_swatches) do
node(:name){|product| product.swatch.name.titleize}
node(:image_url){|product| image_url("products/#{product.swatch.permalink}.jpg") }
node(:product_url){|product| product_url(product.permalink)}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment