<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>config/database.yml.example</filename>
    </added>
    <added>
      <filename>vendor/plugins/single_save/README.rdoc</filename>
    </added>
    <added>
      <filename>vendor/plugins/single_save/Rakefile</filename>
    </added>
    <added>
      <filename>vendor/plugins/single_save/init.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/single_save/install.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/single_save/lib/associations.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/single_save/lib/marked_for_deletion.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/single_save/lib/view_helpers.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/single_save/spec/associations_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/single_save/spec/db/database.yml</filename>
    </added>
    <added>
      <filename>vendor/plugins/single_save/spec/db/schema.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/single_save/spec/db/single_save.sqlite3.db</filename>
    </added>
    <added>
      <filename>vendor/plugins/single_save/spec/debug.log</filename>
    </added>
    <added>
      <filename>vendor/plugins/single_save/spec/marked_for_deletion_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/single_save/spec/spec_helper.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/single_save/tasks/association_creation_from_params_tasks.rake</filename>
    </added>
    <added>
      <filename>vendor/plugins/single_save/uninstall.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -4,6 +4,7 @@
 
   git clone git://github.com/zilkey/complex_forms_demo_app.git
   cd complex_forms_demo_app
+  cp config/database.yml.example config/database.yml #=&gt; update database.yml to match your settings
   rake db:create
   rake db:migrate
   rake db:dataset:load_fixtures DATASET=nasa</diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,8 @@
 class PagesController &lt; ApplicationController
-
+  
+  def index
+  rescue
+    render :text =&gt; &quot;woot!&quot;
+  end
+  
 end</diff>
      <filename>app/controllers/pages_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,12 +7,12 @@
 # Visit http://www.pragmaticprogrammer.com/titles/fr_arr for more book information.
 #---
 class Project &lt; ActiveRecord::Base
-  has_many :tasks, :enable_creation_from_params =&gt; true
-  has_many :assignments, :enable_creation_from_params =&gt; true
+  has_many :tasks, :single_save =&gt; true
+  has_many :assignments, :single_save =&gt; true
   has_many :employees, :through =&gt; :assignments
   has_many :categorizations
-  has_many :categories, :through =&gt; :categorizations, :enable_creation_from_params =&gt; true
-  has_one :project_detail
+  has_many :categories, :through =&gt; :categorizations, :single_save =&gt; true
+  has_one :project_detail, :single_save =&gt; true
   has_and_belongs_to_many :tags
 
   validates_presence_of :name</diff>
      <filename>app/models/project.rb</filename>
    </modified>
    <modified>
      <diff>@@ -58,18 +58,16 @@
 
 &lt;pre&gt;
   class Project &amp;lt; ActiveRecord::Base
-    has_many :tasks
-    has_many :assignments
+    has_many :tasks, :single_save =&amp;gt; true
+    has_many :assignments, :single_save =&amp;gt; true
     has_many :employees, :through =&amp;gt; :assignments
     has_many :categorizations
-    has_many :categories, :through =&amp;gt; :categorizations
+    has_many :categories, :through =&amp;gt; :categorizations, :single_save =&amp;gt; true
+    has_one :project_detail, :single_save =&amp;gt; true
+    has_and_belongs_to_many :tags
 
     validates_presence_of :name
     validates_associated :tasks, :assignments
-
-    after_update :save_tasks
-    after_update :save_assignments
-    after_update :save_categorizations
   end
 &lt;/pre&gt;
 
@@ -215,16 +213,6 @@
     &lt;/pre&gt;
   &lt;/li&gt;
   &lt;li&gt;
-    Make sure the child objects raise errors when they are saved:
-    &lt;pre&gt;
-  def save_assignments
-    assignments.each do |assignment|
-      assignment.save!
-    end
-  end
-    &lt;/pre&gt;
-  &lt;/li&gt;
-  &lt;li&gt;
     Update the controller code to call the correct method:
     &lt;pre&gt;
   def create</diff>
      <filename>app/views/pages/index.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -7,12 +7,12 @@
     &lt;%- error_messages.errors.each do |attr,message| -%&gt;
       &lt;%= content_tag :li, &quot;#{attr.humanize} #{message}&quot; unless associations.include?(attr) %&gt;
     &lt;%- end -%&gt;
-    &lt;%- Project.reflect_on_all_associations.dup.select{|a|a.macro == :has_one}.map(&amp;:name).each do |association| -%&gt;
+    &lt;%- error_messages.class.reflect_on_all_associations.dup.select{|a|a.macro == :has_one}.map(&amp;:name).each do |association| -%&gt;
       &lt;%- error_messages.send(association).errors.each do |attr,message| -%&gt;
         &lt;%= content_tag :li, &quot;#{attr.humanize} #{message}&quot; %&gt;
       &lt;%- end -%&gt;
     &lt;%- end -%&gt;
-    &lt;%- Project.reflect_on_all_associations.dup.select{|a|a.macro == :has_many}.map(&amp;:name).each do |association| -%&gt;
+    &lt;%- error_messages.class.reflect_on_all_associations.dup.select{|a|a.macro == :has_many}.map(&amp;:name).each do |association| -%&gt;
       &lt;%- error_messages.send(association).each_with_index do |object, index| -%&gt;
         &lt;%- unless object.errors.empty? -%&gt;
           &lt;%- content_tag :li do -%&gt;</diff>
      <filename>app/views/projects/_error_messages.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -12,7 +12,7 @@ categorization_00002:
   project_id: 1
   updated_at: 2008-04-16 05:42:35 -04:00
 categorization_00003: 
-  category_id: 2
+  category_id: 3
   created_at: 2008-04-16 05:42:35 -04:00
   id: 3
   project_id: 1</diff>
      <filename>db/dataset/nasa/categorizations.yml</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@
 employee_00001: 
   created_at: 2008-04-16 05:13:07 -04:00
   id: 1
-  name: Niel Armstrong
+  name: Neil Armstrong
   updated_at: 2008-04-16 05:13:07 -04:00
 employee_00002: 
   created_at: 2008-04-16 05:13:29 -04:00</diff>
      <filename>db/dataset/nasa/employees.yml</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@
 #
 # It's strongly recommended to check this file into your version control system.
 
-ActiveRecord::Schema.define(:version =&gt; 20080508121819) do
+ActiveRecord::Schema.define(:version =&gt; 20080508144013) do
 
   create_table &quot;assignments&quot;, :force =&gt; true do |t|
     t.integer  &quot;employee_id&quot;
@@ -32,6 +32,20 @@ ActiveRecord::Schema.define(:version =&gt; 20080508121819) do
     t.datetime &quot;updated_at&quot;
   end
 
+  create_table &quot;codes&quot;, :force =&gt; true do |t|
+    t.string   &quot;name&quot;
+    t.string   &quot;category&quot;
+    t.datetime &quot;created_at&quot;
+    t.datetime &quot;updated_at&quot;
+  end
+
+  create_table &quot;codes_projects&quot;, :force =&gt; true do |t|
+    t.integer  &quot;code_id&quot;
+    t.integer  &quot;project_id&quot;
+    t.datetime &quot;created_at&quot;
+    t.datetime &quot;updated_at&quot;
+  end
+
   create_table &quot;employees&quot;, :force =&gt; true do |t|
     t.string   &quot;name&quot;
     t.datetime &quot;created_at&quot;</diff>
      <filename>db/schema.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>config/database.yml</filename>
    </removed>
    <removed>
      <filename>log/development.log</filename>
    </removed>
    <removed>
      <filename>log/mongrel.log</filename>
    </removed>
    <removed>
      <filename>log/mongrel.pid</filename>
    </removed>
    <removed>
      <filename>log/test.log</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/atomic_saves/README.rdoc</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/atomic_saves/Rakefile</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/atomic_saves/init.rb</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/atomic_saves/install.rb</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/atomic_saves/lib/association_creation_from_params.rb</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/atomic_saves/lib/marked_for_deletion.rb</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/atomic_saves/lib/view_helpers.rb</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/atomic_saves/spec/association_creation_from_params_spec.rb</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/atomic_saves/spec/db/complex_forms_helper.sqlite3.db</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/atomic_saves/spec/db/database.yml</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/atomic_saves/spec/db/schema.rb</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/atomic_saves/spec/debug.log</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/atomic_saves/spec/marked_for_deletion_spec.rb</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/atomic_saves/spec/spec_helper.rb</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/atomic_saves/tasks/association_creation_from_params_tasks.rake</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/atomic_saves/uninstall.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>e424a3bebe4e2e1334a774f48608ce8b7c222778</id>
    </parent>
    <parent>
      <id>b52718ca5992e6ace8a61c9c7884cc9b9f33c888</id>
    </parent>
  </parents>
  <author>
    <name>Jeff Dean</name>
    <email>jeff@zilkey.com</email>
  </author>
  <url>http://github.com/zilkey/complex_forms_demo_app/commit/434e65f00d45d46fa98ef7444f2f80be66306f2c</url>
  <id>434e65f00d45d46fa98ef7444f2f80be66306f2c</id>
  <committed-date>2008-05-15T00:10:41-07:00</committed-date>
  <authored-date>2008-05-15T00:10:41-07:00</authored-date>
  <message>updated error messages</message>
  <tree>334f5d8e0be906e06796a7966ab8c961f26441bb</tree>
  <committer>
    <name>Jeff Dean</name>
    <email>jeff@zilkey.com</email>
  </committer>
</commit>
