<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,6 @@
 class Mistake &lt; ActiveRecord::Base
   belongs_to :performance
   belongs_to :mistake_type
+  
+  attr_accessor :description
 end
\ No newline at end of file</diff>
      <filename>app/models/mistake.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,4 @@
 class Performance &lt; ActiveRecord::Base
+  belongs_to  :user
+  has_many    :mistakes
 end</diff>
      <filename>app/models/performance.rb</filename>
    </modified>
    <modified>
      <diff>@@ -136,4 +136,29 @@
 
 &lt;p&gt;
   &lt;%= link_to &quot;Done&quot;, performances_path %&gt;
-&lt;/p&gt;
\ No newline at end of file
+&lt;/p&gt;
+
+&lt;div id=&quot;mistakes&quot;&gt;
+  &lt;h2&gt;
+    &lt;%= t(:mistakes) %&gt;
+  &lt;/h2&gt;
+  
+  &lt;% if @performance.mistakes.blank? %&gt;
+  &lt;p&gt;
+    &lt;em&gt;&lt;%= t(:'mistake.no_mistakes') %&gt;&lt;/em&gt;
+  &lt;/p&gt;
+  &lt;% else %&gt;
+  &lt;ul&gt;
+    
+  &lt;/ul&gt;
+  &lt;% end %&gt;
+  
+  &lt;% form_for Mistake.new, :url =&gt; performance_mistakes_path(@performance) do |form| %&gt;
+    &lt;p&gt;
+      &lt;%= form.label :description %&gt;
+      &lt;%= form.text_field :description %&gt;
+      &lt;%= form.submit &quot;Add mistake&quot; %&gt;
+    &lt;/p&gt;
+  &lt;% end %&gt;
+&lt;/div&gt;
+</diff>
      <filename>app/views/performances/_form.erb</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,9 @@
 # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
 
 en:
+  mistakes: Mistakes
+  mistake:
+    no_mistakes: No mistakes
   create: Create
   Add: Add
   performances:</diff>
      <filename>config/locales/en.yml</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,9 @@
 ActionController::Routing::Routes.draw do |map|
-  map.resources :users, :performances
+  map.resources :users
+  
+  map.resources :performances do |perf|
+    perf.resources :mistakes
+  end
 
   # config/routes.rb
   map.resource :user_session</diff>
      <filename>config/routes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -19,6 +19,9 @@ PerformanceForm = Behavior.create({
       var perfId = response.responseText;
       this.element.action = this.element.action + '/' + perfId;
       this.element.down('div').insert($input({type: 'hidden', value: 'put', name: '_method'}));
+      
+      $('new_mistake').action = '/performances/' + perfId + '/mistakes';
+      
       this.updating = true;
     }
     
@@ -27,5 +30,6 @@ PerformanceForm = Behavior.create({
 });
 
 Event.addBehavior({
-  '#edit_performance' : PerformanceForm
+  '#edit_performance' : PerformanceForm,
+  '#new_mistake' : Remote.Form
 });
\ No newline at end of file</diff>
      <filename>public/javascripts/performances/show.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c6fc0fbbca55ff6f0bb4ea0fd2a71c8f557e38bd</id>
    </parent>
  </parents>
  <author>
    <name>Jarkko Laine</name>
    <email>jarkko@jlaine.net</email>
  </author>
  <url>http://github.com/jarkko/teamgeist/commit/5f0fd82929c97c08ac140fa7bef6a4a639c1acb6</url>
  <id>5f0fd82929c97c08ac140fa7bef6a4a639c1acb6</id>
  <committed-date>2009-03-29T10:33:43-07:00</committed-date>
  <authored-date>2009-03-29T10:33:43-07:00</authored-date>
  <message>Added first stint at mistake form to the performance form page.</message>
  <tree>3986e47541b6c51052dbcfce7571f6cad5e2f01a</tree>
  <committer>
    <name>Jarkko Laine</name>
    <email>jarkko@jlaine.net</email>
  </committer>
</commit>
