From 742dde3469ce2b1ec9c1e93cfec756d019a09e83 Mon Sep 17 00:00:00 2001 From: Peter Pistorius Date: Tue, 14 Feb 2012 16:18:25 +0200 Subject: [PATCH 1/2] Changed: `Accounts.reset(<%= ... %>)` to `accounts.reset(<%= ... %>)` `Projects.reset(<%= ... %>)` to `projects.reset(<%= ... %>)` As it's popular in JavaScript to capitalize constructors it might be confusing in this context. --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 8de0c34cd..3267bb199 100644 --- a/index.html +++ b/index.html @@ -1597,7 +1597,7 @@

Backbone.Collection

 <script>
-  Accounts.reset(<%= @accounts.to_json %>);
+  accounts.reset(<%= @accounts.to_json %>);
 </script>
 
@@ -3054,8 +3054,8 @@

F.A.Q.

 <script>
-  Accounts.reset(<%= @accounts.to_json %>);
-  Projects.reset(<%= @projects.to_json(:collaborators => true) %>);
+  accounts.reset(<%= @accounts.to_json %>);
+  projects.reset(<%= @projects.to_json(:collaborators => true) %>);
 </script>
 
From c4d53abd064c0fea54c17c348792b216538e0a1a Mon Sep 17 00:00:00 2001 From: Peter Pistorius Date: Tue, 14 Feb 2012 22:58:45 +0200 Subject: [PATCH 2/2] fixes #1004 --- index.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 3267bb199..9bae78106 100644 --- a/index.html +++ b/index.html @@ -1597,7 +1597,8 @@

Backbone.Collection

 <script>
-  accounts.reset(<%= @accounts.to_json %>);
+  var Accounts = new Backbone.Collection;
+  Accounts.reset(<%= @accounts.to_json %>);
 </script>
 
@@ -3054,8 +3055,10 @@

F.A.Q.

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