Skip to content

Instantly share code, notes, and snippets.

@bishopandco
Last active December 18, 2015 19:29
Show Gist options
  • Save bishopandco/5833285 to your computer and use it in GitHub Desktop.
Save bishopandco/5833285 to your computer and use it in GitHub Desktop.
li.product_customizations.collect{|x| x.customized_product_options if x.customized_product_options.last.customizable_product_option_id == 3}.reject{|x| x == nil}
=> [[#<Spree::CustomizedProductOption id: 740, product_customization_id: 731, customizable_product_option_id: 3, value: "https://signaturesettings-artwork.s3.amazonaws.com/...", created_at: "2013-06-21 14:58:56", updated_at: "2013-06-21 14:58:56", customization_image: nil>]]
li.product_customizations.each do |customization|
if customization.customized_product_options.last.customizable_product_option_id == 3
customized_product_options.each do |option|
option
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment