Permalink
Browse files

make the scaffolding work with model names other than user

  • Loading branch information...
Techwraith
Techwraith committed Nov 3, 2012
1 parent 1cdd577 commit 5f0b45e81a3fbf5cb57e017d32c251df127f021e
@@ -12,7 +12,7 @@
</div>
<%% } %>
- <@- partial('form', {user: {}}) @>
+ <@- partial('form', {<%= names.property.singular %>: {}}) @>
<div class="form-actions">
<@- contentTag('input', 'Add', {type: 'submit', class: 'btn btn-primary'}) @>
@@ -12,7 +12,7 @@
</div>
<%% } %>
- <@- partial('form', {user: user}) @>
+ <@- partial('form', {<%= names.property.singular %>: <%= names.property.singular %>}) @>
<div class="form-actions">
<@- contentTag('input', 'Save', {type: 'submit', class: 'btn btn-primary'}) @>
@@ -8,7 +8,7 @@
for err in params.errors
li= err
- != partial('form', {user: {}})
+ != partial('form', {<%= names.property.singular %>: {}})
.form-actions
!= contentTag('input', 'Add', {type: 'submit', class: 'btn btn-primary'})
@@ -8,7 +8,7 @@
for err in params.errors
li= err
- != partial('form', {user: user})
+ != partial('form', {<%= names.property.singular %>: <%= names.property.singular %>})
.form-actions
!= contentTag('input', 'Save', {type: 'submit', class: 'btn btn-primary'})

0 comments on commit 5f0b45e

Please sign in to comment.