disappearing habits

This commit is contained in:
Tyler Renelle 2013-02-08 22:02:25 -05:00
parent 403ae7017d
commit 7f754517a4
2 changed files with 3 additions and 2 deletions

View file

@ -3,6 +3,7 @@
// We could just delete user.idLists, since it's re-created on refresh. However, users's first refresh will scare them
// since everything will dissappear - second refresh will bring everything back.
db.users.find().forEach(function(user){
if (!user.idLists) return;
db.users.update(
{_id:user._id},
{

View file

@ -4,8 +4,8 @@ module.exports.resetDom = (model) ->
window.DERBY.app.dom.clear()
window.DERBY.app.view.render(model)
model.fn '_tnl', '_user.stats.lvl', (lvl) -> (lvl*100)/5
_.each ['habit', 'daily', 'todo', 'reward'], (type) ->
model.refList "_#{type}List", "_user.tasks", "_user.{type}Ids"
# _.each ['habit', 'daily', 'todo', 'reward'], (type) ->
# model.refList "_#{type}List", "_user.tasks", "_user.{type}Ids"
module.exports.app = (appExports, model) ->
loadJavaScripts(model)