Skip to content
Browse files

Fixes #2 - Another typo

  • Loading branch information...
1 parent 8010131 commit 0ef6244126eaa6eafb31aba79b5615f6c2ad4405 @antoviaque committed Jun 7, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 tutorial/tutorial.html
  2. +1 −1 tutorial/tutorial.txt
View
2 tutorial/tutorial.html
@@ -290,7 +290,7 @@ <h4 id="view">View</h4>
});
</code></pre>
<p>Here, we give the visitor the ability to post a new message in the current thread. We monitor clicks on the submit button, retreive the data the user entered using jQuery selectors (<code class="javascript">this.$('.class')</code> is a shortcut for <code>$('.class', this.el)</code>), instantiate a new <code>Message</code> object with the user data, and get Backbone to send it to the API with the <code>save()</code> method. This will send the data to <code>/api/message</code> as a POST request. The <code>message.thread</code> attribute will be set to the value of <code>thread._id</code>, to let the server know which thread to add the message to.</p>
-<p>Since we're adding a new message to <code class="javascript">thread.messages</code>, Backbone-relational will trigger the "messages:add" event, and the new message will get automatically inserted in the DOM via the <code>render_message()</code> method - no extra effort required!</p>
+<p>Since we're adding a new message to <code class="javascript">thread.messages</code>, Backbone-relational will trigger the "add:messages" event, and the new message will get automatically inserted in the DOM via the <code>render_message()</code> method - no extra effort required!</p>
<h3 id="messageview">MessageView</h3>
<h4 id="template_1">Template</h4>
<pre><code class="javascript">&lt;script type="text/template" id="tpl_message"&gt;
View
2 tutorial/tutorial.txt
@@ -338,7 +338,7 @@ Note that the thread template doesn't attempt to represent the thread's messages
Here, we give the visitor the ability to post a new message in the current thread. We monitor clicks on the submit button, retreive the data the user entered using jQuery selectors (`this.$('.class')` is a shortcut for `$('.class', this.el)`), instantiate a new `Message` object with the user data, and get Backbone to send it to the API with the `save()` method. This will send the data to `/api/message` as a POST request. The `message.thread` attribute will be set to the value of `thread._id`, to let the server know which thread to add the message to.
-Since we're adding a new message to `thread.messages`, Backbone-relational will trigger the "messages:add" event, and the new message will get automatically inserted in the DOM via the `render_message()` method - no extra effort required!
+Since we're adding a new message to `thread.messages`, Backbone-relational will trigger the "add:messages" event, and the new message will get automatically inserted in the DOM via the `render_message()` method - no extra effort required!
### MessageView

0 comments on commit 0ef6244

Please sign in to comment.
Something went wrong with that request. Please try again.