Permalink
Browse files

clean up jade example

  • Loading branch information...
1 parent a4aed5f commit 94a6f42efd4c0bb3b52991186821f5626028882c @tj tj committed Oct 7, 2011
View
@@ -47,21 +47,6 @@ app.get('/', function(req, res){
res.render('users', { users: users });
});
-app.get('/users/callback', function(req, res){
- // a callback is also accepted
- res.partial('users/user', users, function(err, html){
- if (err) throw err;
- res.send(html);
- });
-});
-
-app.get('/users', function(req, res){
- // we can use res.partial() as if
- // we were in a view, utilizing the same api
- // to render a fragment
- res.partial('users/user', users);
-});
-
app.get('/users/list', function(req, res){
// use "object" to utilize the name deduced from
// the view filename. The examples below are equivalent
@@ -1,3 +0,0 @@
-head
- title Jade Example
- link(rel="stylesheet", href="/stylesheets/style.css")
@@ -1,5 +1,8 @@
doctype 5
html
- include header
+ head
+ block title
+ title Jade Example
+ link(rel="stylesheet", href="/stylesheets/style.css")
body
block content
@@ -1,6 +1,9 @@
extends ../layout
+block title
+ title Users
+
block content
if users.length
h1 Users

0 comments on commit 94a6f42

Please sign in to comment.