Commit 3e31c772 authored by Michael Nelson's avatar Michael Nelson

Update to lenfire's more recent derby and work around ref issue.

parent 8d11ff58
......@@ -4,7 +4,7 @@
"version": "0.1.0",
"main": "server.js",
"dependencies": {
"derby": "~0.3.13",
"derby": "git://github.com/lefnire/derby#6bf758a587",
"express": "~3.0.1",
"gzippo": "~0.2.0"
},
......
......@@ -30,21 +30,25 @@ get '/:groupName', (page, model, {groupName}) ->
.where('group').equals(groupName)
.where('completed').notEquals(true)
model.set '_filter', 'all'
model.ref '_list.shown', '_list', '_filter'
#model.set '_filter', 'all'
# model.ref '_list.shown', '_list', '_filter'
# Since a recent commit, the above will result in
# model.get('_list.shown') returning:
# function getter(data, pathToRef, rest, refEmitter, prevRests) {..}
model.ref '_list.shown', '_list.all'
page.render()
# Transitional route for enabling a filter
get from: '/:groupName', to: '/:groupName/:filterName',
forward: (model, {filterName}) ->
model.set '_filter', filterName
model.ref '_list.shown', "_list.#{filterName}"
back: (model, params) ->
model.set '_filter', 'all'
model.ref '_list.shown', "_list.all"
get from: '/:groupName/:filterName', to: '/:groupName/:filterName',
forward: (model, {filterName}) ->
model.set '_filter', filterName
model.ref '_list.shown', "_list.#{filterName}"
ready (model) ->
todos = model.at 'todos'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment