From 377aef968b8f782d4a498cefe22567de10e407fc Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Tue, 22 Jan 2013 12:02:46 -0500 Subject: [PATCH] comment on model.query('users').withId(userId) not working --- src/app/index.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/index.coffee b/src/app/index.coffee index e9bdac7789..11d3a96df7 100644 --- a/src/app/index.coffee +++ b/src/app/index.coffee @@ -31,8 +31,10 @@ get '/', (page, model, next) -> # return page.redirect 'https://' + req.headers.host + req.url userId = model.session.userId + # FIXME TMK we should be using model.query() in order to utilize mongo index on _id; however, it's returning empty result + # See derby-auth for current motif (goo.gl/uNOGI) and Racer query README (goo.gl/p7YRt) for side-by-side comparison + #q = model.query('users').withId(userId) q = "users.#{userId}" - #q = model.query('users').withId(userId) # FIXME this should be working, and we need to get it working so we can use mongodb indexes model.subscribe q, (err, user) -> model.ref '_user', user userObj = user.get()