From 05ff5d3def1a170921a45c0c69f4c664f2fb0da1 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Mon, 18 Apr 2011 11:48:07 -0400 Subject: [PATCH] small tweak to collection template --- templates/collection.js.erb | 2 +- templates/collection_spec.js.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/collection.js.erb b/templates/collection.js.erb index 8aa5c10..a46d326 100644 --- a/templates/collection.js.erb +++ b/templates/collection.js.erb @@ -1,4 +1,4 @@ var <%= plural_object_name %> = Backbone.Collection.extend({ - url: '/<%= underscore_name %>', + url: '/<%= plural_underscore_name %>', model: <%= object_name %> }); diff --git a/templates/collection_spec.js.erb b/templates/collection_spec.js.erb index bc3379c..e44db44 100644 --- a/templates/collection_spec.js.erb +++ b/templates/collection_spec.js.erb @@ -6,7 +6,7 @@ describe('<%= plural_object_name %>', function() { it('should fetch records from the API', function() { collection = new <%= plural_object_name %>(); - this.server.respondWith('GET', '<%= plural_underscore_name %>', this.validJSONResponse([{id: 1}])); + this.server.respondWith('GET', '/<%= plural_underscore_name %>', this.validJSONResponse([{id: 1}])); collection.fetch() this.server.respond();