title: emberjs in the console I see that records are created but they are not displayed by handlebars
body: <p>First many <strong>thanks to Mike Grassotti</strong>, for helping in the IRC. He helped resolved the bugs with the save method.</p>
  
  <p>My problem is that in the console I see that records are created but they are not displayed.</p>
  
  <p>I am using ember-data to create new record. The <strong>addComment function</strong>  creates the <strong>record in a transaction</strong>, while the <strong>save function</strong>, only calls <strong>this.transaction.commit</strong>.</p>
  
  <p>In the console after I click save(), the record seems created but handlebars doesn't display the newly created record. This is an excerpt of what I see in the console when I dig into the results of console.log</p>
  
  <pre><code> &gt;committed: Object
      firstRecordKind: "belongsTo"
      firstRecordName: "post"
   &gt;firstRecordReference: Object
     clientId: 4
     id: "ember411"
  &gt;type: EmBlog.Comment
     ClassMixin: Ember.Mixin
    &gt;FIXTURES: Array[1]
      0: Object
        body: "ty"
        id: "ember411"
        post: "1"
  </code></pre>
  
  <p>To create a new record, click on post -> then 'post title' -> at the bottom addComment- > then save and you will see that the record was not created.</p>
  
  <p><strong>The relevant bit of code from the <a href="http://jsfiddle.net/VMkQ2/2/" rel="nofollow">jsfiddle</a>. This controller will not have a route as it will be sideloaded</strong></p>
  
  <pre><code>EmBlog.CommentNewController = Em.ObjectController.extend({
  
   needs: ['postsShow'],
   isAddingNew: false,
  
   addComment: function(body){
      console.log("this: ", this.toString());
      var post = this.get('controllers.postsShow.content');
      console.log(post);
  
     transaction = this.get('store').transaction();
     console.log(transaction);
     console.log(this.get('content').toString());
  
     this.set('content', transaction.createRecord(EmBlog.Comment, ({post: post })));
     this.transaction = transaction;
  
     console.log(this.get('content').toString());
  
     this.set('isAddingNew', true);
   },
  
   save: function(){
     var comment = this.get('content');
  
     comment.one('didCreate', this, function() {
        this.set('isAddingNew', false);
     });
  
    this.transaction.commit();
  
   }  
  
  });
  </code></pre>
  
  <p><strong>The relevant bit from the handlebars template</strong></p>
  
  <pre><code>&lt;script type="text/x-handlebars" data-template-name="posts/show"&gt;
    &lt;h1&gt;Post&lt;/h1&gt;
  
    &lt;h3&gt; {{title}} &lt;/h3&gt;
    &lt;h3&gt; {{body}} &lt;/h3&gt;
     &lt;br/&gt;
    &lt;p&gt; {{#linkTo 'posts.index'}} back {{/linkTo}}&lt;/p&gt;
    &lt;p&gt; {{#linkTo 'posts.edit' content}} Edit the post  {{/linkTo}}&lt;/p&gt; 
  
    &lt;br/&gt;
    &lt;b&gt; Comments&lt;/b&gt;
     {{render 'comment/new' comments}}
  &lt;/script&gt;
  
  &lt;script type='text/x-handlebars' data-template-name='comment/new'&gt;
       {{#if controller.isAddingNew}}
       &lt;form {{action save on='submit'}}&gt;
      {{view Ember.TextArea valueBinding="body" placeholder="body"}}
      &lt;button type="submit"&gt; save comment &lt;/button&gt;  
      &lt;/form&gt;
       {{/if}} 
  
      &lt;br/&gt;
  
     &lt;div&gt;
     &lt;button {{action addComment}} {{bindAttr disabled="isAddingNew"}}&gt;Add Comment&lt;/button&gt;
    &lt;/div&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>Thanks</p>