comment on model.query('users').withId(userId) not working

This commit is contained in:
Tyler Renelle
2013-01-22 12:02:46 -05:00
parent 6c57ce7da4
commit 377aef968b
+3 -1
View File
@@ -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()