<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -10,10 +10,10 @@ describe &quot;On a ProjectsController, when updating&quot;, ActionController::TestCase do
     @project.tasks.create(:name =&gt; 'Try with our plugin')
     @tasks = @project.tasks
     
-    @valid_update_params = { :name =&gt; 'Dinner', :tasks_attributes =&gt; {
-      @tasks.first.id =&gt; { :name =&gt; &quot;Buy food&quot; },
-      @tasks.last.id  =&gt; { :name =&gt; &quot;Cook&quot; }
-    }}
+    @valid_update_params = { :name =&gt; 'Dinner', :tasks_attributes =&gt; [
+      { :id =&gt; @tasks.first.id, :name =&gt; &quot;Buy food&quot; },
+      { :id =&gt; @tasks.last.id,  :name =&gt; &quot;Cook&quot; }
+    ]}
   end
   
   it &quot;should update the name of the author&quot; do
@@ -30,7 +30,7 @@ describe &quot;On a ProjectsController, when updating&quot;, ActionController::TestCase do
   end
   
   it &quot;should destroy a missing task&quot; do
-    @valid_update_params[:tasks_attributes][@tasks.first.id]['_delete'] = '1'
+    @valid_update_params[:tasks_attributes].first['_delete'] = '1'
     
     lambda {
       put :update, :id =&gt; @project.id, :project =&gt; @valid_update_params
@@ -38,7 +38,7 @@ describe &quot;On a ProjectsController, when updating&quot;, ActionController::TestCase do
   end
   
   it &quot;should add a new task&quot; do
-    @valid_update_params[:tasks_attributes]['new_12345'] = { :name =&gt; 'Take out' }
+    @valid_update_params[:tasks_attributes] &lt;&lt; { :name =&gt; 'Take out' }
     
     lambda {
       put :update, :id =&gt; @project.id, :project =&gt; @valid_update_params
@@ -46,7 +46,7 @@ describe &quot;On a ProjectsController, when updating&quot;, ActionController::TestCase do
   end
   
   it &quot;should reject any new task where the name is empty&quot; do
-    @valid_update_params[:tasks_attributes]['new_12345'] = { 'name' =&gt; '', :due_at =&gt; nil }
+    @valid_update_params[:tasks_attributes] &lt;&lt; { 'name' =&gt; '', :due_at =&gt; nil }
     
     lambda {
       put :update, :id =&gt; @project.id, :project =&gt; @valid_update_params
@@ -56,8 +56,8 @@ describe &quot;On a ProjectsController, when updating&quot;, ActionController::TestCase do
   end
   
   it &quot;should destroy a task and add a new one&quot; do
-    @valid_update_params[:tasks_attributes][@tasks.first.id]['_delete'] = '1'
-    @valid_update_params[:tasks_attributes]['new_12345'] = { :name =&gt; 'Take out' }
+    @valid_update_params[:tasks_attributes].first['_delete'] = '1'
+    @valid_update_params[:tasks_attributes] &lt;&lt; { :name =&gt; 'Take out' }
     
     lambda {
       put :update, :id =&gt; @project.id, :project =&gt; @valid_update_params
@@ -65,7 +65,11 @@ describe &quot;On a ProjectsController, when updating&quot;, ActionController::TestCase do
   end
   
   it &quot;should not be valid if a task is invalid&quot; do
-    put :update, :id =&gt; @project.id, :project =&gt; { :name =&gt; 'Nothing', :tasks_attributes =&gt; { @tasks.first.id =&gt; { :name =&gt; '' }, @tasks.last.id =&gt; { :name =&gt; '' }}}
+    put :update, :id =&gt; @project.id, :project =&gt; { :name =&gt; 'Nothing', :tasks_attributes =&gt;[
+      { :id =&gt; @tasks.first.id, :name =&gt; '' },
+      { :id =&gt; @tasks.last.id, :name =&gt; '' }
+    ]}
+    
     project = assigns(:project)
     
     project.should.not.be.valid</diff>
      <filename>test/functional/projects_controller_test.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>test/unit/project_test.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>347bcefbf3eefa1af24cf70f42e25bd8dc348e68</id>
    </parent>
  </parents>
  <author>
    <name>Eloy Duran</name>
    <email>eloy.de.enige@gmail.com</email>
  </author>
  <url>http://github.com/alloy/complex-form-examples/commit/1cf18211d0cafd4bcf271ed41aae74be00d335cb</url>
  <id>1cf18211d0cafd4bcf271ed41aae74be00d335cb</id>
  <committed-date>2009-03-09T14:52:41-07:00</committed-date>
  <authored-date>2009-03-09T14:52:41-07:00</authored-date>
  <message>Made projects_controller tests green. Removed last useless test case, we only need functional ones for demo purposes.</message>
  <tree>43b1f13da30dd508e55ecd1e90556964015c7bdd</tree>
  <committer>
    <name>Eloy Duran</name>
    <email>eloy.de.enige@gmail.com</email>
  </committer>
</commit>
