Skip to content

Commit

Permalink
Fixed nesting in model example
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Sep 24, 2010
1 parent 2dd70a3 commit ed9427d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/model.jade
@@ -1,7 +1,7 @@
:model
form(user)
p
field(name)
p
field(email)
buttons
p
field(name)
p
field(email)
buttons
1 change: 1 addition & 0 deletions examples/model.js
Expand Up @@ -56,6 +56,7 @@ Visitor.prototype.visitTag = function(node){
node.removeAttribute(this.record);
node.setAttribute('id', '"' + this.record + '-model-form"');
node.setAttribute('method', '"post"');

// when the record is not new, we probably want a _method hidden
// field to tell our server to use PUT with frameworks like Express
var code = new nodes.Code('if (!' + this.record + '.new)');
Expand Down

0 comments on commit ed9427d

Please sign in to comment.