Hi,
I have before filter which save 2 variables in local store
app = $.sammy '#container', () ->
store = new Sammy.Store {name: 'name', type: 'local'}
this.use(Sammy.Template, 'tpl');
...
this.before () ->
if not store.exists("site")
store.load "site", "/templates/contents.tpl"
if not store.exists("lib")
store.load "lib", "/mycouch/some_id"
console.log "lib"
this.get '^\/$', (ctx) ->
console.log "home"
both are remote async call to couchdb. First - usual sammy.js plugin method. The second - simple GET request to couchdb's database "mycouch"
first works as expected before a main route, but second not. So I've got in firebug:
> site
> home
> lib
I have got correct values for both site and lib, but lib not works as before filter, alas.
Where is my mistake?