Permalink
Browse files

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

will no longer throw.
  • Loading branch information...
1 parent 6b0def7 commit 55f726bf9f1108df0b9861c72fed7a61f86bed58 @larzconwell larzconwell committed Nov 29, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 55f726b

Please sign in to comment.