Commit d3d43815 authored by Sindre Sorhus's avatar Sindre Sorhus

Merge pull request #340 from absoludity/update-derby-version

Update to lenfire's more recent derby and work around ref issue.
parents 8d11ff58 b2c11f5e
......@@ -4,7 +4,7 @@
"version": "0.1.0",
"main": "server.js",
"dependencies": {
"derby": "~0.3.13",
"derby": "git://github.com/lefnire/derby#master",
"express": "~3.0.1",
"gzippo": "~0.2.0"
},
......
......@@ -30,21 +30,26 @@ 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'
# XXX 2012-12-04 Calling .get on keyed ref returns getter fn.
# We used to use the above keyed ref on _list, but when
# using derby master, it results in
# https://github.com/codeparty/derby/issues/179
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