Last active
December 16, 2015 18:39
-
-
Save larzconwell/5479009 to your computer and use it in GitHub Desktop.
This is the state for one of the incorrectly rendered pages from lib/template/template_node.js in the handleLoaded function. Layouts and templates are split up and joined later via the yield function in layouts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Here if you look at the content field the template replaced | |
// from yield(in the adapter.template field), it's different | |
// than the content field from the template_state.js content field. | |
{ id: 0, | |
data: | |
{ registered: true, | |
file: 'app/views/layouts/application.html.ejs', | |
ext: '.ejs', | |
baseName: 'application', | |
baseNamePath: 'app/views/layouts/application' }, | |
dirname: 'app/views/layouts', | |
params: | |
{ method: 'GET', | |
controller: 'Main', | |
action: 'index', | |
index: [Function], | |
test1: [Function], | |
test2: [Function], | |
app: | |
{ router: [Object], | |
modelRegistry: {}, | |
templateRegistry: [Object], | |
controllerRegistry: {}, | |
init: [Function], | |
handleControllerAction: [Function], | |
handleStaticFile: [Function], | |
handleMethodNotAllowed: [Function], | |
handleNotFound: [Function], | |
handleNoMatchedRoute: [Function], | |
handleNoAction: [Function], | |
handleNoController: [Function], | |
start: [Function], | |
viewHelpers: [Object] }, | |
url: '/', | |
params: [Circular], | |
accessTime: 1367194273753, | |
request: | |
{ _readableState: [Object], | |
readable: true, | |
domain: [Object], | |
_events: {}, | |
_maxListeners: 10, | |
socket: [Object], | |
connection: [Object], | |
httpVersion: '1.1', | |
complete: true, | |
headers: [Object], | |
trailers: {}, | |
_pendings: [], | |
_pendingIndex: 0, | |
url: '/', | |
method: 'GET', | |
statusCode: null, | |
client: [Object], | |
_consuming: true, | |
_dumped: true, | |
httpVersionMajor: 1, | |
httpVersionMinor: 1, | |
upgrade: false, | |
query: {}, | |
_geddyId: '18FD33A3-BF97-4AB3-B46B-C4DCF58523F1', | |
controller: [Object], | |
read: [Function] }, | |
response: | |
{ resp: [Object], | |
domain: [Object], | |
_events: [Object], | |
_maxListeners: 10, | |
output: [], | |
outputEncodings: [], | |
writable: true, | |
_last: false, | |
chunkedEncoding: false, | |
shouldKeepAlive: true, | |
useChunkedEncodingByDefault: true, | |
sendDate: true, | |
_hasBody: true, | |
_trailer: '', | |
finished: false, | |
_hangupClose: false, | |
socket: [Object], | |
connection: [Object], | |
_geddyId: '18FD33A3-BF97-4AB3-B46B-C4DCF58523F1', | |
controller: [Object] }, | |
name: 'Main', | |
cookies: { collection: [Object] }, | |
i18n: { getText: [Function], t: [Function] }, | |
session: | |
{ id: 'CxBD0XAgFx0OL6MhBCw5arN2URdZz47d5xvQ8iBVUWvlh9CvG5OxUgBOwRet1ePY9i944ICdN8qwgJdGhKNKy5WYaVJV5LMNUD4EdO8xhQWg4OkteL1YOKQkK4yo01e0', | |
controller: [Object], | |
data: [Object], | |
expires: 1368403873753, | |
flash: [Object] }, | |
flash: { session: [Object], used: [], messages: {} }, | |
template: | |
{ registered: true, | |
file: 'app/views/layouts/application.html.ejs', | |
ext: '.ejs', | |
baseName: 'application', | |
baseNamePath: 'app/views/layouts/application' }, | |
layout: 'app/views/layouts/mains', | |
respondsWith: [ 'txt' ], | |
content: '', | |
completed: false, | |
sameOriginToken: null, | |
_beforeFilters: [], | |
_afterFilters: [], | |
_handleAction: [Function], | |
_doResponse: [Function], | |
before: [Function], | |
after: [Function], | |
protectFromForgery: [Function], | |
redirect: [Function], | |
error: [Function], | |
transfer: [Function], | |
respond: [Function], | |
render: [Function], | |
renderTemplate: [Function], | |
partial: [Function], | |
registerData: [Function], | |
urlFor: [Function], | |
contentTag: [Function], | |
selectTag: [Function], | |
linkTo: [Function], | |
scriptLink: [Function], | |
styleLink: [Function], | |
imageTag: [Function], | |
imageLink: [Function], | |
truncate: [Function], | |
truncateHTML: [Function], | |
test2Path: '/test2', | |
test1Path: '/test1', | |
mainsPath: '/', | |
yield: [Function], | |
utils: | |
{ mixin: [Function], | |
enhance: [Function], | |
isEmpty: [Function], | |
string: [Object], | |
file: [Object], | |
async: [Object], | |
i18n: [Object], | |
uri: [Object], | |
array: [Object], | |
object: [Object], | |
date: [Object], | |
request: [Function], | |
log: [Object], | |
network: [Object], | |
inflection: [Object], | |
SortedCollection: [Function], | |
EventBuffer: [Function], | |
XML: [Object], | |
_getConstructorsFromDirectory: [Function] }, | |
rethrow: [Function] }, | |
parentNode: null, | |
loaded: true, | |
cachedFinish: true, | |
childNodes: {}, | |
content: '<!DOCTYPE html>\n<html lang="en">\n <head>\n <meta charset="utf-8">\n <title>Geddy App | This app uses Geddy.js</title>\n <meta name="description" content="">\n <meta name="author" content="">\n <meta name="viewport" content="width=device-width" />\n\n <!-- The HTML5 shim, for IE6-8 support of HTML elements -->\n <!--[if lt IE 9]>\n <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>\n <![endif]-->\n\n <script src="/js/jquery.min.js" type="text/javascript"></script>\n <script src="/js/bootstrap.min.js" type="text/javascript"></script>\n <script src="/js/core/core.js" type="text/javascript"></script>\n <!-- <script src="/js/models/your_model.js" type="text/javascript"></script> -->\n <script src="/js/config/init.js" type="text/javascript"></script>\n\n <link href="/css/bootstrap.min.css" rel="stylesheet" />\n <link href="/css/style.css" rel="stylesheet" />\n <link href="/css/bootstrap.responsive.min.css" rel="stylesheet" />\n\n <!-- The fav and touch icons -->\n <link rel="shortcut icon" href="/images/favicon.ico">\n <link rel="apple-touch-icon" href="images/apple-touch-icon.png">\n <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">\n <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">\n </head>\n <body>\n <div class="navbar navbar-fixed-top">\n <div class="navbar-inner">\n <div class="container">\n <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">\n <span class="i-bar"><i class="icon-chevron-down icon-white"></i></span>\n </a>\n <a class="brand" href="/">Geddy App</a>\n <div class="nav-collapse">\n <ul class="nav">\n <li class="active"><a href="/">Home</a></li>\n <li><a href="http://geddyjs.org/tutorial">Tutorial</a></li>\n <li><a href="http://geddyjs.org/documentation">Docs</a></li>\n </ul>\n </div><!--/.nav-collapse -->\n </div>\n </div>\n </div>\n <div class="container">\n <!-- Lets talk about geddy -->\n<div class="hero-unit geddy-welcome-box">\n <h1>TEST1</h1>\n <p>You\'ve created a Geddy app and your server is running. If you already know what you\'re doing, feel free to jump into your app logic, if not...</p>\n <p><a class="btn btn-primary btn-large" href="http://geddyjs.org/tutorial.html">Lets get you started »</a></p>\n</div>\n\n </div>\n </body>\n</html>\n', | |
adapter: | |
{ options: {}, | |
engineName: '.ejs', | |
engine: { engine: [Object] }, | |
helpers: {}, | |
template: '<!DOCTYPE html>\n<html lang="en">\n <head>\n <meta charset="utf-8">\n <title>Geddy App | This app uses Geddy.js</title>\n <meta name="description" content="">\n <meta name="author" content="">\n <meta name="viewport" content="width=device-width" />\n\n <!-- The HTML5 shim, for IE6-8 support of HTML elements -->\n <!--[if lt IE 9]>\n <%- scriptLink(\'http://html5shim.googlecode.com/svn/trunk/html5.js\', {type:\'text/javascript\'}) %>\n <![endif]-->\n\n <%- scriptLink(\'/js/jquery.min.js\', {type:\'text/javascript\'}) %>\n <%- scriptLink(\'/js/bootstrap.min.js\', {type:\'text/javascript\'}) %>\n <%- scriptLink(\'/js/core/core.js\', {type: \'text/javascript\'}) %>\n <!-- <%- scriptLink(\'/js/models/your_model.js\', {type:\'text/javascript\'}) %> -->\n <%- scriptLink(\'/js/config/init.js\', {type: \'text/javascript\'}) %>\n\n <%- styleLink(\'/css/bootstrap.min.css\', {rel:\'stylesheet\'}) %>\n <%- styleLink(\'/css/style.css\', {rel:\'stylesheet\'}) %>\n <%- styleLink(\'/css/bootstrap.responsive.min.css\', {rel:\'stylesheet\'}) %>\n\n <!-- The fav and touch icons -->\n <link rel="shortcut icon" href="/images/favicon.ico">\n <link rel="apple-touch-icon" href="images/apple-touch-icon.png">\n <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">\n <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">\n </head>\n <body>\n <div class="navbar navbar-fixed-top">\n <div class="navbar-inner">\n <div class="container">\n <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">\n <span class="i-bar"><i class="icon-chevron-down icon-white"></i></span>\n </a>\n <%- linkTo(\'Geddy App\', mainsPath, {class: \'brand\'}) %>\n <div class="nav-collapse">\n <ul class="nav">\n <li class="active"><%- linkTo(\'Home\', mainsPath) %></li>\n <li><%- linkTo(\'Tutorial\', \'http://geddyjs.org/tutorial\') %></li>\n <li><%- linkTo(\'Docs\', \'http://geddyjs.org/documentation\') %></li>\n </ul>\n </div><!--/.nav-collapse -->\n </div>\n </div>\n </div>\n <div class="container">\n <%- yield(); %>\n </div>\n </body>\n</html>\n', | |
fn: [Function] }, | |
finishRoot: [Function] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Lot of cruft, but the interesting part is the content and adapter.template fields, the content is | |
// the correct template before and after parsing. | |
{ id: 0, | |
data: | |
{ registered: true, | |
file: 'app/views/main/index.html.ejs', | |
ext: '.ejs', | |
baseName: 'index', | |
baseNamePath: 'app/views/main/index' }, | |
dirname: 'app/views/main', | |
params: | |
{ method: 'GET', | |
controller: 'Main', | |
action: 'index', | |
index: [Function], | |
test1: [Function], | |
test2: [Function], | |
app: | |
{ router: [Object], | |
modelRegistry: {}, | |
templateRegistry: [Object], | |
controllerRegistry: {}, | |
init: [Function], | |
handleControllerAction: [Function], | |
handleStaticFile: [Function], | |
handleMethodNotAllowed: [Function], | |
handleNotFound: [Function], | |
handleNoMatchedRoute: [Function], | |
handleNoAction: [Function], | |
handleNoController: [Function], | |
start: [Function], | |
viewHelpers: [Object] }, | |
url: '/', | |
params: [Circular], | |
accessTime: 1367194273753, | |
request: | |
{ _readableState: [Object], | |
readable: true, | |
domain: [Object], | |
_events: {}, | |
_maxListeners: 10, | |
socket: [Object], | |
connection: [Object], | |
httpVersion: '1.1', | |
complete: true, | |
headers: [Object], | |
trailers: {}, | |
_pendings: [], | |
_pendingIndex: 0, | |
url: '/', | |
method: 'GET', | |
statusCode: null, | |
client: [Object], | |
_consuming: false, | |
_dumped: false, | |
httpVersionMajor: 1, | |
httpVersionMinor: 1, | |
upgrade: false, | |
query: {}, | |
_geddyId: '18FD33A3-BF97-4AB3-B46B-C4DCF58523F1', | |
controller: [Object] }, | |
response: | |
{ resp: [Object], | |
domain: [Object], | |
_events: [Object], | |
_maxListeners: 10, | |
output: [], | |
outputEncodings: [], | |
writable: true, | |
_last: false, | |
chunkedEncoding: false, | |
shouldKeepAlive: true, | |
useChunkedEncodingByDefault: true, | |
sendDate: true, | |
_hasBody: true, | |
_trailer: '', | |
finished: false, | |
_hangupClose: false, | |
socket: [Object], | |
connection: [Object], | |
_geddyId: '18FD33A3-BF97-4AB3-B46B-C4DCF58523F1', | |
controller: [Object] }, | |
name: 'Main', | |
cookies: { collection: [Object] }, | |
i18n: { getText: [Function], t: [Function] }, | |
session: | |
{ id: 'CxBD0XAgFx0OL6MhBCw5arN2URdZz47d5xvQ8iBVUWvlh9CvG5OxUgBOwRet1ePY9i944ICdN8qwgJdGhKNKy5WYaVJV5LMNUD4EdO8xhQWg4OkteL1YOKQkK4yo01e0', | |
controller: [Object], | |
data: {}, | |
expires: 1368403873753, | |
flash: [Object] }, | |
flash: { session: [Object], used: [], messages: {} }, | |
template: | |
{ registered: true, | |
file: 'app/views/main/index.html.ejs', | |
ext: '.ejs', | |
baseName: 'index', | |
baseNamePath: 'app/views/main/index' }, | |
layout: 'app/views/layouts/mains', | |
respondsWith: [ 'txt' ], | |
content: '', | |
completed: false, | |
sameOriginToken: null, | |
_beforeFilters: [], | |
_afterFilters: [], | |
_handleAction: [Function], | |
_doResponse: [Function], | |
before: [Function], | |
after: [Function], | |
protectFromForgery: [Function], | |
redirect: [Function], | |
error: [Function], | |
transfer: [Function], | |
respond: [Function], | |
render: [Function], | |
renderTemplate: [Function], | |
partial: [Function], | |
registerData: [Function], | |
urlFor: [Function], | |
contentTag: [Function], | |
selectTag: [Function], | |
linkTo: [Function], | |
scriptLink: [Function], | |
styleLink: [Function], | |
imageTag: [Function], | |
imageLink: [Function], | |
truncate: [Function], | |
truncateHTML: [Function], | |
test2Path: '/test2', | |
test1Path: '/test1', | |
mainsPath: '/', | |
yield: [Function], | |
utils: | |
{ mixin: [Function], | |
enhance: [Function], | |
isEmpty: [Function], | |
string: [Object], | |
file: [Object], | |
async: [Object], | |
i18n: [Object], | |
uri: [Object], | |
array: [Object], | |
object: [Object], | |
date: [Object], | |
request: [Function], | |
log: [Object], | |
network: [Object], | |
inflection: [Object], | |
SortedCollection: [Function], | |
EventBuffer: [Function], | |
XML: [Object], | |
_getConstructorsFromDirectory: [Function] }, | |
rethrow: [Function] }, | |
parentNode: null, | |
loaded: true, | |
cachedFinish: true, | |
childNodes: {}, | |
content: '<!-- Lets talk about geddy -->\n<div class="hero-unit geddy-welcome-box">\n <h1>Hello, World!</h1>\n <p>You\'ve created a Geddy app and your server is running. If you already know what you\'re doing, feel free to jump into your app logic, if not...</p>\n <p><a class="btn btn-primary btn-large" href="http://geddyjs.org/tutorial.html">Lets get you started »</a></p>\n</div>\n', | |
adapter: | |
{ options: {}, | |
engineName: '.ejs', | |
engine: { engine: [Object] }, | |
helpers: {}, | |
template: '<!-- Lets talk about geddy -->\n<div class="hero-unit geddy-welcome-box">\n <h1>Hello, World!</h1>\n <p>You\'ve created a Geddy app and your server is running. If you already know what you\'re doing, feel free to jump into your app logic, if not...</p>\n <p><%- linkTo(\'Lets get you started »\', \'http://geddyjs.org/tutorial.html\', {class: \'btn btn-primary btn-large\'}) %></p>\n</div>\n', | |
fn: [Function] }, | |
finishRoot: [Function] } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment