Permalink
Browse files

Closes #276, related to #259. Generating a resource with no properties

will no longer throw.
  • Loading branch information...
1 parent 9df9550 commit 5576e9fb577deb536fa97a51af357d1735513a5c @larzconwell larzconwell committed Nov 29, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 templates/resource/model.ejs
View
2 templates/resource/model.ejs
@@ -2,7 +2,7 @@ var <%= names.constructor.singular %> = function () {
this.defineProperties({
<% for (var i in properties) { -%>
-<% if (properties[i].name !== 'id') { -%>
+<% if (properties[i].name && properties[i].name !== 'id') { -%>
<% if (i === 'default') { -%>
<%= properties[i].name %>: {type: '<%= properties[i].type %>', required: true},
<% } else { -%>

0 comments on commit 5576e9f

Please sign in to comment.