These are chat archives for canjs/canjs

4th
Nov 2015
Josh Dean
@imjoshdean
Nov 04 2015 15:14
Hey - is there some trick to getting the new Model.List({}); calls findAll and updates the contents of the list with the results thing working that I'm missing?
cc @justinbmeyer @daffl?
the Model's findAll function runs, and resolves a deferred with the data but the list contains an empty array
Justin Meyer
@justinbmeyer
Nov 04 2015 15:17
@imjoshdean no, works by default
how does the data look
Josh Dean
@imjoshdean
Nov 04 2015 15:17
one sec I'll whip something up
Data comes back as
{ "15|boom": { "type": "boom", "data": {} } }
I run it through models (though I suppose I should be using parseModels but I don't imagine it makes much difference) to convert it from an object to an array
Josh Dean
@imjoshdean
Nov 04 2015 15:59
@justinbmeyer?
Justin Meyer
@justinbmeyer
Nov 04 2015 16:30
@imjoshdean it does
make a difference
probably
also, not sure how it's going to find "15|boom"
Josh Dean
@imjoshdean
Nov 04 2015 16:30
I swapped just to check - but got the same result
Justin Meyer
@justinbmeyer
Nov 04 2015 16:30
the data needs to look like {data: []}
if you use a normal findAll
do you get back a list?
Josh Dean
@imjoshdean
Nov 04 2015 16:31
I'm reading from a JSON file using NodeJS fs, so I'm not exactly traditional here.
I resolve the data with { "15|boom": { "type": "boom", "data": {} } }
it goes into parseModels
I convert it from an object to an array and return that
Justin Meyer
@justinbmeyer
Nov 04 2015 16:48
hmm, that should work then
does normal .findAll work?
Josh Dean
@imjoshdean
Nov 04 2015 16:49
you mean with a $.ajax request?
or do you mean just doing findAll and it returning what I expect with this particular example?
You probably mean the latter.
Yeah that works.
dylanrtt
@dylanrtt
Nov 04 2015 20:15
where would I go about trying to fix #1800? I can't find where the processing was switched off for custom attrs
dylanrtt
@dylanrtt
Nov 04 2015 20:47
nvm found it on stache.js:278 (I think) but ran into other errors so I give up