Skip to content

Commit

Permalink
Merge pull request #217 from MiguelMadero/unifyCodeGeneration
Browse files Browse the repository at this point in the history
The model generated by resource and scaffold was different
  • Loading branch information
larzconwell committed Oct 9, 2012
2 parents ea57fef + 5c0cdea commit e6a0e67
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions templates/resource/model.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ var <%= names.constructor.singular %> = function () {
<% } -%>
});

<% for(var i in properties) { -%>
<% if(properties[i].name === 'id' && properties[i].type === 'int') { -%>
this.autoIncrementId = true;
<% } -%>
<% } -%>

/*
this.property('login', 'string', {required: true});
this.property('password', 'string', {required: true});
Expand Down

0 comments on commit e6a0e67

Please sign in to comment.