Permalink
Browse files

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

Update to lenfire's more recent derby and work around ref issue.
  • Loading branch information...
2 parents 8d11ff5 + b2c11f5 commit d3d438158bbf3ddc137e948761ef978b48e908dd @sindresorhus sindresorhus committed Dec 5, 2012
@@ -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'

0 comments on commit d3d4381

Please sign in to comment.