Navigation Menu

Skip to content

Commit

Permalink
Merge pull request jashkenas#2219 from tgriesser/docs-updates
Browse files Browse the repository at this point in the history
Lowercase books in docs
  • Loading branch information
caseywebdev committed Feb 11, 2013
2 parents 9396756 + bccce45 commit 3ce8ff8
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions index.html
Expand Up @@ -1584,19 +1584,19 @@ <h2 id="Collection">Backbone.Collection</h2>
</ul>

<pre>
Books.each(function(book) {
books.each(function(book) {
book.publish();
});

var titles = Books.map(function(book) {
var titles = books.map(function(book) {
return book.get("title");
});

var publishedBooks = Books.filter(function(book) {
var publishedBooks = books.filter(function(book) {
return book.get("published") === true;
});

var alphabetical = Books.sortBy(function(book) {
var alphabetical = books.sortBy(function(book) {
return book.author.get("name").toLowerCase();
});
</pre>
Expand Down Expand Up @@ -1662,8 +1662,8 @@ <h2 id="Collection">Backbone.Collection</h2>

<pre>
&lt;script&gt;
var Accounts = new Backbone.Collection;
Accounts.reset(&lt;%= @accounts.to_json %&gt;);
var accounts = new Backbone.Collection;
accounts.reset(&lt;%= @accounts.to_json %&gt;);
&lt;/script&gt;
</pre>

Expand Down Expand Up @@ -1931,10 +1931,10 @@ <h2 id="Collection">Backbone.Collection</h2>
alert(method + ": " + model.url);
};

var Accounts = new Backbone.Collection;
Accounts.url = '/accounts';
var accounts = new Backbone.Collection;
accounts.url = '/accounts';

Accounts.fetch();
accounts.fetch();
</pre>

<p>
Expand Down Expand Up @@ -1987,9 +1987,9 @@ <h2 id="Collection">Backbone.Collection</h2>
model: Book
});

var NYPL = new Library;
var nypl = new Library;

var othello = NYPL.create({
var othello = nypl.create({
title: "Othello",
author: "William Shakespeare"
});
Expand Down Expand Up @@ -3622,11 +3622,11 @@ <h2 id="faq">F.A.Q.</h2>

});

var Inbox = new Mailbox;
var inbox = new Mailbox;

// And then, when the Inbox is opened:

Inbox.messages.fetch();
inbox.messages.fetch();
</pre>

<p>
Expand Down Expand Up @@ -3680,10 +3680,10 @@ <h2 id="faq">F.A.Q.</h2>

<pre>
&lt;script&gt;
var Accounts = new Backbone.Collection;
Accounts.reset(&lt;%= @accounts.to_json %&gt;);
var Projects = new Backbone.Collection;
Projects.reset(&lt;%= @projects.to_json(:collaborators => true) %&gt;);
var accounts = new Backbone.Collection;
accounts.reset(&lt;%= @accounts.to_json %&gt;);
var projects = new Backbone.Collection;
projects.reset(&lt;%= @projects.to_json(:collaborators => true) %&gt;);
&lt;/script&gt;
</pre>

Expand Down

0 comments on commit 3ce8ff8

Please sign in to comment.