Skip to content
Myr

Added as: global support

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent edfb18b · Browse files · 4 files+26 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+26 added−4 removed

  • tests:+15 added−2 removed
  • other:+11 added−2 removed

4 files+26 added−4 removed

modified:lib/express/view.js+6 added-2 removed
added:test/fixtures/partials/video.jade+1 added
1p= director
modified:test/view.test.js+14 added-2 removed
93 unmodified lines
94 assert.response(app,95 { url: '/movies' },96 { body: html });97 98 // "as" collection option98 // as: str collection option99 app.get('/user', function(req, res){100 res.send(res.partial('user.jade', {101 as: 'person',102 collection: [{ name: 'tj' }]
3 unmodified lines
106 assert.response(app,107 { url: '/user' },108 { body: '<p>tj</p>' });109 110 // "as" this collection option110 // as: this collection option111 app.get('/person', function(req, res){112 res.send(res.partial('person.jade', {113 as: this,114 collection: [{ name: 'tj' }]
2 unmodified lines
117 118 assert.response(app,119 { url: '/person' },120 { body: '<p>tj</p>' });121122 // as: global collection option123 app.get('/videos', function(req, res){124 res.send(res.partial('video.jade', {125 as: global,126 collection: movies127 }));128 });129130 assert.response(app,131 { url: '/videos' },132 { body: '<p>Tim Burton</p><p>James Cameron</p>' });133 }134};
modified:.pomo+5 added
77 unmodified lines
78 complete: false79 description: 80 length: 2581 name: next(err) from within view system?82- !ruby/object:Pomo::Task 83 complete: false84 description: 85 length: 2586 name: view defaults / extension defaults