<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -15,7 +15,7 @@ class OrdersController &lt; Spree::BaseController
   create.after do    
     params[:products].each do |product_id,variant_id|
       quantity = params[:quantity].to_i if !params[:quantity].is_a?(Array)
-      quantity = params[:quantity][variant_id].to_i  if params[:quantity].is_a?(Array)
+      quantity = params[:quantity][variant_id].to_i if params[:quantity].is_a?(Array)
       @order.add_variant(Variant.find(variant_id), quantity) if quantity &gt; 0
     end if params[:products]
     
@@ -24,7 +24,7 @@ class OrdersController &lt; Spree::BaseController
       @order.add_variant(Variant.find(variant_id), quantity) if quantity &gt; 0
     end if params[:variants]
     
-    @order.save 
+    @order.save
     
     # store order token in the session
     session[:order_token] = @order.token</diff>
      <filename>app/controllers/orders_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,13 +13,13 @@ describe OrdersController do
     it &quot;should add the variant to the order&quot; do
       controller.stub!(:object).and_return(@order)
       @order.should_receive(:add_variant).with(@variant, 2)
-	    post :create, :variants =&gt; {&quot;345&quot; =&gt; 2}
+      post :create, :variants =&gt; {&quot;345&quot; =&gt; 2}
     end
-  
+
     it &quot;should not set the state&quot; do
       @order.should_not_receive(:state=)
       post :create, :id =&gt; @order.number, :quantities =&gt; {456 =&gt; &quot;123=1&quot;}, :order =&gt; {:state =&gt; &quot;paid&quot;}
-    end    
+    end   
   end
   
   describe &quot;update&quot; do</diff>
      <filename>spec/controllers/orders_controller_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>97c50aaedbdeb8d2247ac53447d09b95eb882899</id>
    </parent>
  </parents>
  <author>
    <name>David North</name>
    <email>davidnorth@gmail.com</email>
  </author>
  <url>http://github.com/akitaonrails/spree/commit/7f3fa6b4ed7caa69a8b2c495d93ba4d7d13fecff</url>
  <id>7f3fa6b4ed7caa69a8b2c495d93ba4d7d13fecff</id>
  <committed-date>2009-04-15T19:31:29-07:00</committed-date>
  <authored-date>2009-02-27T18:57:35-08:00</authored-date>
  <message>Fix that if you tried to add a product to the cart that had variants but you forgot to pick one, you got an application error. Client side validation still required.</message>
  <tree>fb4284e53537418c016b1cc2e1255df8e2ed759a</tree>
  <committer>
    <name>Sean Schofield</name>
    <email>schof@apache.org</email>
  </committer>
</commit>
