Skip to content

Instantly share code, notes, and snippets.

@Willianvdv
Created January 13, 2014 16:30
Show Gist options
  • Save Willianvdv/8403243 to your computer and use it in GitHub Desktop.
Save Willianvdv/8403243 to your computer and use it in GitHub Desktop.
Spree require_master_price crash
>> Spree.version
=> "2.1.4.beta"
>> Spree::Config[:require_master_price] = true
>> attr = {:name=>"The Other Product", :price=>19.99, :shipping_category_id=>1, :product_properties_attributes=>[{:property_name=>"fabric", :value=>"cotton"}]}
>> pr = Spree::Product.new attr
>> pr.save!
RuntimeError: No master variant found to infer price
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment